You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently this is how RPCs are serialized and sent:
// server call:RpcOnFire(42);// RpcOnFire:[ClientRpc]voidRpcOnFire(intvalue){NetworkWriterPooledwriter=NetworkWriterPool.Get();// GET WRITERwriter.WriteVarInt(value);// WRITESendRPCInternal("RpcOnFire",-1182161215,writer,0,includeOwner:true);NetworkWriterPool.Return(writer);}voidSendRpcInternal(){RpcMessagemessage=newRpcMessage{netId=netId,componentIndex=ComponentIndex,functionHash=(ushort)functionHashCode,payload=writer.ToArraySegment()// ARRAYSEGMENT};using(NetworkWriterPooledserialized=NetworkWriterPool.Get())// GET WRITER{// serialize onceserialized.Write(message);// WRITE// send to all observersforeach(NetworkConnectionToClientconninnetIdentity.observers.Values)conn.Send(message,channelId);}}
Currently this is how RPCs are serialized and sent:
Instead, we could do this:
The text was updated successfully, but these errors were encountered: