SceneReplicationConfig

继承: Resource < RefCounted < Object

Configuration for properties to synchronize with a MultiplayerSynchronizer.

方法


枚举

enum ReplicationMode:

ReplicationMode REPLICATION_MODE_NEVER = 0

Do not keep the given property synchronized.

ReplicationMode REPLICATION_MODE_ALWAYS = 1

Replicate the given property on process by constantly sending updates using unreliable transfer mode.

ReplicationMode REPLICATION_MODE_ON_CHANGE = 2

Replicate the given property on process by sending updates using reliable transfer mode when its value changes.


方法说明

void add_property ( path: NodePath, index: int = -1 )

Adds the property identified by the given path to the list of the properties being synchronized, optionally passing an index.

Note: For details on restrictions and limitations on property synchronization, see MultiplayerSynchronizer.


Array NodePath get_properties ( ) const1

Returns a list of synchronized property NodePath s.


bool has_property ( path: NodePath ) const1

Returns true if the given path is configured for synchronization.


int property_get_index ( path: NodePath ) const1

Finds the index of the given path.


ReplicationMode property_get_replication_mode ( path: NodePath )

Returns the replication mode for the property identified by the given path. See ReplicationMode.


bool property_get_spawn ( path: NodePath )

Returns true if the property identified by the given path is configured to be synchronized on spawn.


bool property_get_sync ( path: NodePath )

已弃用: Use property_get_replication_mode instead.

Returns true if the property identified by the given path is configured to be synchronized on process.


bool property_get_watch ( path: NodePath )

已弃用: Use property_get_replication_mode instead.

Returns true if the property identified by the given path is configured to be reliably synchronized when changes are detected on process.


void property_set_replication_mode ( path: NodePath, mode: ReplicationMode )

Sets the synchronization mode for the property identified by the given path. See ReplicationMode.


void property_set_spawn ( path: NodePath, enabled: bool )

Sets whether the property identified by the given path is configured to be synchronized on spawn.


void property_set_sync ( path: NodePath, enabled: bool )

已弃用: Use property_set_replication_mode with REPLICATION_MODE_ALWAYS instead.

Sets whether the property identified by the given path is configured to be synchronized on process.


void property_set_watch ( path: NodePath, enabled: bool )

已弃用: Use property_set_replication_mode with REPLICATION_MODE_ON_CHANGE instead.

Sets whether the property identified by the given path is configured to be reliably synchronized when changes are detected on process.


void remove_property ( path: NodePath )

Removes the property identified by the given path from the configuration.

2

本方法通常需要用户覆盖才能生效。

1

本方法无副作用,不会修改该实例的任何成员变量。

3

本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。

4

本方法用于构造某个类型。

5

调用本方法无需实例,可直接使用类名进行调用。

6

本方法描述的是使用本类型作为左操作数的有效运算符。

7

这个值是由下列位标志构成位掩码的整数。

8

无返回值。