Skip to main content

Client

Description

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

Events

Client event
public Dictionary<string, Action<string, NetworkIdentity>> ClientStringAction;
public Dictionary<string, Action<float, NetworkIdentity>> ClientFloatAction;
public Dictionary<string, Action<int, NetworkIdentity>> ClientIntAction;
public Dictionary<string, Action<bool, NetworkIdentity>> ClientBoolAction;
public Dictionary<string, Action<Vector3, NetworkIdentity>> ClientVector3Action;
public Dictionary<string, Action<Quaternion, NetworkIdentity>> ClientQuaternionAction;
public Dictionary<string, Action<GameObject, NetworkIdentity>> ClientGameObjectAction;
public Dictionary<string, Action<TransformData, NetworkIdentity>> ClientTransformDataAction;
public Dictionary<string, Action<NetworkIdentity>> ClientAction;

Methods

Description

Only the client can call this Method (a warning or error will be raised if called on the server).

info

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

Client Trigger
public void ClientSender(string _eventName,  NetworkIdentity _sender);
public void ClientStringSender(string _eventName, string _parameter, NetworkIdentity _sender);
public void ClientFloatSender(string _eventName, float _parameter, NetworkIdentity _sender);
public void ClientIntSender(string _eventName, int _parameter, NetworkIdentity _sender);
public void ClientBoolSender(string _eventName, bool _parameter, NetworkIdentity _sender);
public void ClientVector3Sender(string _eventName, Vector3 _parameter, NetworkIdentity _sender);
public void ClientQuaternionSender(string _eventName, Quaternion _parameter, NetworkIdentity _sender);
public void ClientGameObjectSender(string _eventName, GameObject _parameter, NetworkIdentity _sender);
public void ClientTransformDataSender(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