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);
 }
Beispiel #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);
 }
        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);
        }
Beispiel #5
0
 public void Write(NetworkSceneId value)
 {
     WritePackedUInt32(value.Value);
 }
Beispiel #6
0
 // only used when fixing duplicate scene IDs duing post-processing
 public void ForceSceneId(int newSceneId)
 {
     m_SceneId = new NetworkSceneId((uint)newSceneId);
 }
 public void Write(NetworkSceneId value)
 {
   this.WritePackedUInt32(value.Value);
 }
 /// <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);
 }
 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;
 }
Beispiel #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;
 }