Beispiel #1
0
 public override void Write(NetBuffer msg)
 {
     msg.Write(netId);
     msg.Write(sceneId);
     msg.Write(assetId);
     NetSerialize.Write(msg, objectState);
 }
Beispiel #2
0
 public override void Write(NetBuffer m)
 {
     m.Write(netid);
     m.Write(netComponentId);
     m.Write(originalMessageId);
     NetSerialize.Write(m, messageData);
 }
Beispiel #3
0
        public static void WriteVectorArray(NetBuffer buffer, Vector3[] objectState)
        {
            if (objectState != null && objectState.Length > 0)
            {
                buffer.Write(objectState.Length);

                foreach (Vector3 f in objectState)
                {
                    NetSerialize.Write(buffer, f);
                }
            }
            else
            {
                buffer.Write((int)0);
            }
        }
        internal void Serialize(NetBuffer msg, bool initialState)
        {
            if (initialState)
            {
                msg.Write(precomputedAssetId);
                msg.Write(sceneId);
                msg.Write(ownerId);
                msg.Write(netId);

                NetSerialize.Write(msg, transform.position);
                NetSerialize.Write(msg, transform.rotation);
            }

            foreach (UNetworkBehaviour comp in cachedBehaviours)
            {
                comp.Serialize(msg, initialState);
            }
        }
Beispiel #5
0
 public override void Write(NetBuffer msgOut)
 {
     msgOut.Write(targetNetID);
     msgOut.Write(netComponentId);
     NetSerialize.Write(msgOut, data);
 }
 public override void Serialize(NetBuffer msg, bool initialState)
 {
     NetSerialize.Write(msg, transform.position);
     NetSerialize.Write(msg, transform.rotation);
 }