class-description NEWS COMMUNITY STORE LABS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE LABS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectNode MultiplayerSynchronizer
Synchronizes properties from the multiplayer authority to the remote peers.

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.

delta_synchronized delta_synchronized<>():delta_synchronized

Emitted when a new delta synchronization state is received by this synchronizer after the properties have been updated.

synchronized synchronized<>():synchronized

Emitted when a new synchronization state is received by this synchronizer after the properties have been updated.

visibility_changed visibility_changed<>( int=, int:=, ):visibility_changed

Emitted when visibility of for_peer is updated. See update_visibility.

Enum VisibilityUpdateMode<>():Enum

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.

float delta_interval<>():float

Time interval between delta synchronizations. When set to 0.0 (the default), delta synchronizations happen every network process frame.

bool public_visibility<>():bool

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.

SceneReplicationConfig replication_config<>():SceneReplicationConfig

Resource containing which properties to synchronize.

float replication_interval<>():float

Time interval between synchronizations. When set to 0.0 (the default), synchronizations happen every network process frame.

NodePath root_path<>():NodePath

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.

VisibilityUpdateMode visibility_update_mode<>():VisibilityUpdateMode

Specifies when visibility filters are updated (see VisibilityUpdateMode for options).

void add_visibility_filter<>( Callable filter=, filter:Callable=, ):void

Adds a peer visibility filter for this synchronizer.

filter should take a peer ID int and return a bool.

bool get_visibility_for<>( int peer=, peer:int=, ):bool

Queries the current visibility for peer peer.

void remove_visibility_filter<>( Callable filter=, filter:Callable=, ):void

Removes a peer visibility filter from this synchronizer.

void set_visibility_for<>( int peer=, peer:int=, bool visible=, visible:bool=, ):void

Sets the visibility of peer to visible. If peer is 0, the value of public_visibility will be updated instead.

void update_visibility<>( int=, int:=, ):void

Updates the visibility of for_peer according to visibility filters. If for_peer is 0 (the default), all peers' visibilties are updated.




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...