Skip to main content

Server

Description

Register a server event receiver to listen for client network callbacks. Only the server can call this Method (a warning or error is raised when called by the client).

Events

public Dictionary<string, Action<NetworkIdentity>> ServerAction;
public Dictionary<string, Action<string, NetworkIdentity>> ServerStringAction;
public Dictionary<string, Action<float, NetworkIdentity>> ServerFloatAction;
public Dictionary<string, Action<int, NetworkIdentity>> ServerIntAction;
public Dictionary<string, Action<bool, NetworkIdentity>> ServerBoolAction;
public Dictionary<string, Action<Vector3, NetworkIdentity>> ServerVector3Action;
public Dictionary<string, Action<Quaternion, NetworkIdentity>> ServerQuaternionAction;
public Dictionary<string, Action<GameObject, NetworkIdentity>> ServerGameObjectAction;
public Dictionary<string, Action<TransformData, NetworkIdentity>> ServerTransformDataAction;

Methods

Description

Only a server can call the method (throws a warning or an error when called on a client).

info

There have None,Int,Float,String,Vector3,Quaternion,GameObject(NetworkGameObject), TransformData.

Server Trigger
public void ServerSender(string _eventName,  NetworkIdentity _sender);
public void ServerStringSender(string _eventName, string _parameter, NetworkIdentity _sender);
public void ServerFloatSender(string _eventName, float _parameter, NetworkIdentity _sender);
public void ServerIntSender(string _eventName, int _parameter, NetworkIdentity _sender);
public void ServerBoolSender(string _eventName, bool _parameter, NetworkIdentity _sender);
public void ServerVector3Sender(string _eventName, Vector3 _parameter, NetworkIdentity _sender);
public void ServerQuaternionSender(string _eventName, Quaternion _parameter, NetworkIdentity _sender);
public void ServerGameObjectSender(string _eventName, GameObject _parameter, NetworkIdentity _sender);
public void ServerTransformDataSender(string _eventName, TransformData _parameter, NetworkIdentity _sender);

Parameters

NameTypeDescription
_eventNamestringKey of event dictnary
_parameterInt/Float/String/Bool/TransformData/Vector3/Quaternion/NetkGameObjectIncomming data
_senderNetworkIdentityWho sent this remote action