MultiplayerApiExtension
Base class used for extending the MultiplayerAPI.
Base class used for extending the MultiplayerApi.
This class can be used to extend or replace the default MultiplayerApi implementation via script or extensions.
The following example extend the default implementation (SceneMultiplayer) by logging every RPC being made, and every object being configured for replication.
Then in your main scene or in an autoload call EntityTree.SetMultiplayer to start using your custom MultiplayerApi:
Native extensions can alternatively use the MultiplayerApi.SetDefaultInterface method during initialization to configure themselves as the default implementation.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
MultiplayerApiExtensionConstructor
public MultiplayerApiExtension();Methods9
_GetMultiplayerPeerMultiplayerPeer
public virtual MultiplayerPeer _GetMultiplayerPeer();Called when the MultiplayerApi.MultiplayerPeer is retrieved.
MultiplayerPeer_GetPeerIdsint[]
public virtual int[] _GetPeerIds();Callback for MultiplayerApi.GetPeers.
int[]_GetRemoteSenderIdint
public virtual int _GetRemoteSenderId();Callback for MultiplayerApi.GetRemoteSenderId.
int_GetUniqueIdint
public virtual int _GetUniqueId();Callback for MultiplayerApi.GetUniqueId.
int_ObjectConfigurationAddError
public virtual Error _ObjectConfigurationAdd(ReckfellObject @object, Variant configuration);Callback for MultiplayerApi.ObjectConfigurationAdd.
| Name | Type | Default |
|---|---|---|
object | ReckfellObject | — |
configuration | Variant | — |
Error_ObjectConfigurationRemoveError
public virtual Error _ObjectConfigurationRemove(ReckfellObject @object, Variant configuration);Callback for MultiplayerApi.ObjectConfigurationRemove.
| Name | Type | Default |
|---|---|---|
object | ReckfellObject | — |
configuration | Variant | — |
Error_PollError
public virtual Error _Poll();Callback for MultiplayerApi.Poll.
Error_RpcError
public virtual Error _Rpc(int peer, ReckfellObject @object, StringName method, Reckfell.Collections.Array args);Callback for MultiplayerApi.Rpc.
| Name | Type | Default |
|---|---|---|
peer | int | — |
object | ReckfellObject | — |
method | StringName | — |
args | Reckfell.Collections.Array | — |
Error_SetMultiplayerPeervoid
public virtual void _SetMultiplayerPeer(MultiplayerPeer multiplayerPeer);Called when the MultiplayerApi.MultiplayerPeer is set.
| Name | Type | Default |
|---|---|---|
multiplayerPeer | MultiplayerPeer | — |