void RPC() { using (NeutronWriter streamParams = new NeutronWriter()) { streamParams.Write(transform.position); streamParams.Write(transform.rotation); streamParams.Write(GetRigidbody.velocity); streamParams.Write(GetRigidbody.angularVelocity); //====================================================================================================================================== Neutron.RPC(isMine, 255, ValidationPacket.Movement, syncTime, streamParams, sendTo, false, Broadcast.Channel, (ProtocolType)(int)protocolType); } }
// Update is called once per frame void Update() { if (Neutron.IsMine) { if (GetParameters(out object[] parameters)) { using (NeutronWriter streamParams = new NeutronWriter()) { streamParams.Write(parameters.Serialize()); //====================================================================================================================================== Neutron.RPC(Neutron.NeutronObject, 254, ValidationPacket.None, syncTime, streamParams, SendTo.Others, false, Broadcast.Channel, (ProtocolType)(int)protocolType); } } } }