InternalChangeLocalID









How do I use Internal Change Local I D
Below are practical examples compiled from projects for learning and reference purposes

Featured Snippets


File name: NetworkingPeer.cs Copy
905     public void ChangeLocalID(int newID)
906     {
907         if (this.mLocalActor == null)
908         {
909             Debug.LogWarning(
910                 string.Format(
911                     "Local actor is null or not in mActors! mLocalActor: {0} mActors==null: {1} newID: {2}",
912                     this.mLocalActor,
913                     this.mActors == null,
914                     newID));
915         }
916
917         if (this.mActors.ContainsKey(this.mLocalActor.ID))
918         {
919             this.mActors.Remove(this.mLocalActor.ID);
920         }
921
922         this.mLocalActor.InternalChangeLocalID(newID);
923         this.mActors[this.mLocalActor.ID] = this.mLocalActor;
924         this.RebuildPlayerListCopies();
925     }
File name: PhotonPlayer.cs Copy
138     internal void InternalChangeLocalID(int newID)
139     {
140         if (!this.isLocal)
141         {
142             Debug.LogError("ERROR You should never change PhotonPlayer IDs!");
143             return;
144         }
145
146         this.actorID = newID;
147     }

InternalChangeLocalID 152 lượt xem

Gõ tìm kiếm nhanh...