Table of Contents

Class SceneReplicationConfig

Namespace
Godot
Assembly
GodotSharp.dll
public class SceneReplicationConfig : Resource, IDisposable
Inheritance
SceneReplicationConfig
Implements
Inherited Members

Constructors

SceneReplicationConfig()

public SceneReplicationConfig()

Methods

AddProperty(NodePath, int)

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.

public void AddProperty(NodePath path, int index = -1)

Parameters

path NodePath
index int

GetProperties()

Returns a list of synchronized property NodePaths.

public Array<NodePath> GetProperties()

Returns

Array<NodePath>

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

HasProperty(NodePath)

Returns whether the given path is configured for synchronization.

public bool HasProperty(NodePath path)

Parameters

path NodePath

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool

PropertyGetIndex(NodePath)

Finds the index of the given path.

public int PropertyGetIndex(NodePath path)

Parameters

path NodePath

Returns

int

PropertyGetReplicationMode(NodePath)

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

public SceneReplicationConfig.ReplicationMode PropertyGetReplicationMode(NodePath path)

Parameters

path NodePath

Returns

SceneReplicationConfig.ReplicationMode

PropertyGetSpawn(NodePath)

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

public bool PropertyGetSpawn(NodePath path)

Parameters

path NodePath

Returns

bool

PropertyGetSync(NodePath)

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

Deprecated. Use PropertyGetReplicationMode(NodePath) instead.

[Obsolete("This method is deprecated.")]
public bool PropertyGetSync(NodePath path)

Parameters

path NodePath

Returns

bool

PropertyGetWatch(NodePath)

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

Deprecated. Use PropertyGetReplicationMode(NodePath) instead.

[Obsolete("This method is deprecated.")]
public bool PropertyGetWatch(NodePath path)

Parameters

path NodePath

Returns

bool

PropertySetReplicationMode(NodePath, ReplicationMode)

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

public void PropertySetReplicationMode(NodePath path, SceneReplicationConfig.ReplicationMode mode)

Parameters

path NodePath
mode SceneReplicationConfig.ReplicationMode

PropertySetSpawn(NodePath, bool)

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

public void PropertySetSpawn(NodePath path, bool enabled)

Parameters

path NodePath
enabled bool

PropertySetSync(NodePath, bool)

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

Deprecated. Use PropertySetReplicationMode(NodePath, ReplicationMode) with Always instead.

[Obsolete("This method is deprecated.")]
public void PropertySetSync(NodePath path, bool enabled)

Parameters

path NodePath
enabled bool

PropertySetWatch(NodePath, bool)

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

Deprecated. Use PropertySetReplicationMode(NodePath, ReplicationMode) with OnChange instead.

[Obsolete("This method is deprecated.")]
public void PropertySetWatch(NodePath path, bool enabled)

Parameters

path NodePath
enabled bool

RemoveProperty(NodePath)

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

public void RemoveProperty(NodePath path)

Parameters

path NodePath