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
GetProperties()
Returns a list of synchronized property NodePaths.
public Array<NodePath> GetProperties()
Returns
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_nameName of the method to check for.
Returns
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_nameName of the signal to check for.
Returns
HasProperty(NodePath)
Returns whether the given path
is configured for synchronization.
public bool HasProperty(NodePath path)
Parameters
path
NodePath
Returns
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_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.
Returns
PropertyGetIndex(NodePath)
Finds the index of the given path
.
public int PropertyGetIndex(NodePath path)
Parameters
path
NodePath
Returns
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
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
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
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
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
NodePathmode
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
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
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
RemoveProperty(NodePath)
Removes the property identified by the given path
from the configuration.
public void RemoveProperty(NodePath path)
Parameters
path
NodePath