Skip to main content

ServerCallbacks

ServerCallbacks

Description

Register a server event receiver to listen for client network callbacks. Same as the server, but without warning when called by the client.

Events

public Dictionary<string, Action<string, NetworkIdentity>> ServerCallbackStringAction;
public Dictionary<string, Action<float, NetworkIdentity>> ServerCallbackFloatAction;
public Dictionary<string, Action<int, NetworkIdentity>> ServerCallbackIntAction;
public Dictionary<string, Action<bool, NetworkIdentity>> ServerCallbackBoolAction;
public Dictionary<string, Action<Vector3, NetworkIdentity>> ServerCallbackVector3Action;
public Dictionary<string, Action<Quaternion, NetworkIdentity>> ServerCallbackQuaternionAction;
public Dictionary<string, Action<GameObject, NetworkIdentity>> ServerCallbackGameObjectAction;
public Dictionary<string, Action<TransformData, NetworkIdentity>> ServerCallbackTransformDataAction;
public Dictionary<string, Action<NetworkIdentity>> ServerCallbackAction;

Methods

Description

Same as Server but does not throw warning when called on client.

info

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

Servercallback Trigger
public void ServerCallbackSender(string _eventName,  NetworkIdentity _sender);
public void ServerCallbackStringSender(string _eventName, string _parameter, NetworkIdentity _sender);
public void ServerCallbackFloatSender(string _eventName, float _parameter, NetworkIdentity _sender);
public void ServerCallbackIntSender(string _eventName, int _parameter, NetworkIdentity _sender);
public void ServerCallbackBoolSender(string _eventName, bool _parameter, NetworkIdentity _sender);
public void ServerCallbackVector3Sender(string _eventName, Vector3 _parameter, NetworkIdentity _sender);
public void ServerCallbackQuaternionSender(string _eventName, Quaternion _parameter, NetworkIdentity _sender);
public void ServerCallbackGameObjectSender(string _eventName, GameObject _parameter, NetworkIdentity _sender);
public void ServerCallbackTransformDataSender(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