sending data photon c#
void OnPhotonSerializeView(PhotonStream stream,PhotonMessageInfo info)
{
if (stream.isWriting)
{
//We own this player: send the others our data
stream.SendNext((int)controllerScript._characterState);
stream.SendNext(transform.position);
stream.SendNext(transform.rotation);
}
else
{
//Network player, receive data
controllerScript._characterState = (CharacterState)(int)stream.ReceiveNext();
correctPlayerPos = (Vector3)stream.ReceiveNext();
correctPlayerRot = (Quaternion)stream.ReceiveNext();
}
}
Also in C#:
- transform.Translate movement
- check if two timespans intersect c#
- kill child C#
- c# length of array
- What is a class in c#
- datagridview select row column cell c#
- Unity if object doens't exist
- set decimal point c#
- asp.net core mvc not triggering client side validation
- c# trim string
- unity get child
- c# download string url
- c# get value of object in enum
- sending data photon c#
- c# type of generic is string
- rotatearound unity
- dynamic group by expression C#
- C# colours
- set object to random color unity
- C# webclient immitate browser
- while loop in c#
- c# find duplicates in list
- unity transfoprm position y change
- transform.translate unity