Esempio n. 1
0
 // helper function to trigger a full rebuild.
 // most implementations should call this in a certain interval.
 // some might call this all the time, or only on team changes or
 // scene changes and so on.
 //
 // IMPORTANT: check if NetworkServer.active when using Update()!
 protected void RebuildAll()
 {
     foreach (NetworkIdentity identity in NetworkServer.spawned.Values)
     {
         NetworkServer.RebuildObservers(identity, false);
     }
 }
Esempio n. 2
0
 void RebuildMatchObservers(Guid matchId)
 {
     foreach (NetworkIdentity netIdentity in matchObjects[matchId])
     {
         if (netIdentity != null)
         {
             NetworkServer.RebuildObservers(netIdentity, false);
         }
     }
 }
Esempio n. 3
0
 void RebuildSceneObservers(Scene scene)
 {
     foreach (NetworkIdentity netIdentity in sceneObjects[scene])
     {
         if (netIdentity != null)
         {
             NetworkServer.RebuildObservers(netIdentity, false);
         }
     }
 }
Esempio n. 4
0
 void RebuildTeamObservers(string teamId)
 {
     foreach (NetworkIdentity netIdentity in teamObjects[teamId])
     {
         if (netIdentity != null)
         {
             NetworkServer.RebuildObservers(netIdentity, false);
         }
     }
 }