public override void Deserialize(NetworkReader reader)
 {
     this.netId = reader.ReadNetworkId();
     this.sceneId = reader.ReadSceneId();
     this.position = reader.ReadVector3();
     this.payload = reader.ReadBytesAndSize();
 }
 internal static NetworkIdentity SpawnSceneObject(NetworkSceneId sceneId)
 {
     if (s_SpawnableObjects.ContainsKey(sceneId))
     {
         NetworkIdentity foundId = s_SpawnableObjects[sceneId];
         s_SpawnableObjects.Remove(sceneId);
         return(foundId);
     }
     return(null);
 }
Пример #3
0
 internal static NetworkIdentity SpawnSceneObject(NetworkSceneId sceneId)
 {
     if (ClientScene.s_SpawnableObjects.ContainsKey(sceneId))
     {
         NetworkIdentity result = ClientScene.s_SpawnableObjects[sceneId];
         ClientScene.s_SpawnableObjects.Remove(sceneId);
         return(result);
     }
     return(null);
 }
Пример #4
0
        internal static NetworkIdentity SpawnSceneObject(NetworkSceneId sceneId)
        {
            if (!ClientScene.s_SpawnableObjects.ContainsKey(sceneId))
            {
                return((NetworkIdentity)null);
            }
            NetworkIdentity spawnableObject = ClientScene.s_SpawnableObjects[sceneId];

            ClientScene.s_SpawnableObjects.Remove(sceneId);
            return(spawnableObject);
        }
Пример #5
0
 public void Write(NetworkSceneId value)
 {
     WritePackedUInt32(value.Value);
 }
Пример #6
0
 // only used when fixing duplicate scene IDs duing post-processing
 public void ForceSceneId(int newSceneId)
 {
     m_SceneId = new NetworkSceneId((uint)newSceneId);
 }
Пример #7
0
 public void Write(NetworkSceneId value)
 {
   this.WritePackedUInt32(value.Value);
 }
Пример #8
0
 /// <summary>
 /// 
 /// <para>
 /// Force the scene ID to a specific value.
 /// </para>
 /// 
 /// </summary>
 /// <param name="sceneId">The new scene ID.</param>
 public void ForceSceneId(int sceneId)
 {
     this.m_SceneId = new NetworkSceneId((uint) sceneId);
 }
Пример #9
0
 internal static NetworkIdentity SpawnSceneObject(NetworkSceneId sceneId)
 {
   if (!ClientScene.s_SpawnableObjects.ContainsKey(sceneId))
     return (NetworkIdentity) null;
   NetworkIdentity spawnableObject = ClientScene.s_SpawnableObjects[sceneId];
   ClientScene.s_SpawnableObjects.Remove(sceneId);
   return spawnableObject;
 }
Пример #10
0
 internal static NetworkIdentity SpawnSceneObject(NetworkSceneId sceneId)
 {
     if (s_SpawnableObjects.ContainsKey(sceneId))
     {
         NetworkIdentity identity = s_SpawnableObjects[sceneId];
         s_SpawnableObjects.Remove(sceneId);
         return identity;
     }
     return null;
 }