By default, MultiplayerSynchronizer synchronizes configured properties to all peers.
Visibility can be handled directly with set_visibility_for or as-needed with add_visibility_filter and update_visibility.
MultiplayerSpawners will handle nodes according to visibility of synchronizers as long as the node at root_path was spawned by one.
Internally, MultiplayerSynchronizer uses MultiplayerAPI.object_configuration_add to notify synchronization start passing the Node at root_path as the object
and itself as the configuration
, and uses MultiplayerAPI.object_configuration_remove to notify synchronization end in a similar way.
Emitted when a new delta synchronization state is received by this synchronizer after the properties have been updated.
Emitted when a new synchronization state is received by this synchronizer after the properties have been updated.
Emitted when visibility of for_peer
is updated. See update_visibility.
VISIBILITY_PROCESS_IDLE = 0
Visibility filters are updated during process frames (see Node.NOTIFICATION_INTERNAL_PROCESS).
VISIBILITY_PROCESS_PHYSICS = 1
Visibility filters are updated during physics frames (see Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS).
VISIBILITY_PROCESS_NONE = 2
Visibility filters are not updated automatically, and must be updated manually by calling update_visibility.
Time interval between delta synchronizations. When set to 0.0
(the default), delta synchronizations happen every network process frame.
Whether synchronization should be visible to all peers by default. See set_visibility_for and add_visibility_filter for ways of configuring fine-grained visibility options.
Resource containing which properties to synchronize.
Time interval between synchronizations. When set to 0.0
(the default), synchronizations happen every network process frame.
Node path that replicated properties are relative to.
If root_path was spawned by a MultiplayerSpawner, the node will be also be spawned and despawned based on this synchronizer visibility options.
Specifies when visibility filters are updated (see VisibilityUpdateMode for options).
Adds a peer visibility filter for this synchronizer.
Queries the current visibility for peer peer
.
Removes a peer visibility filter from this synchronizer.
Sets the visibility of peer
to visible
. If peer
is 0
, the value of public_visibility will be updated instead.
Updates the visibility of for_peer
according to visibility filters. If for_peer
is 0
(the default), all peers' visibilties are updated.