OpSetCustomPropertiesOfRoom









How do I use Op Set Custom Properties Of Room
Below are practical examples compiled from projects for learning and reference purposes

Featured Snippets


File name: LoadbalancingPeer.cs Copy
321         public bool OpSetCustomPropertiesOfRoom(Hashtable gameProperties, bool broadcast, byte channelId)
322         {
323             return this.OpSetPropertiesOfRoom(gameProperties.StripToStringKeys(), broadcast, channelId);
324         }
File name: Room.cs Copy
196     public void SetCustomProperties(Hashtable propertiesToSet)
197     {
198         if (propertiesToSet == null)
199         {
200             return;
201         }
202
203         // merge (delete null-values)
204         this.customProperties.MergeStringKeys(propertiesToSet); // includes a Equals check (simplifying things)
205         this.customProperties.StripKeysWithNullValues();
206
207
208         // send (sync) these new values
209         Hashtable customProps = propertiesToSet.StripToStringKeys() as Hashtable;
210         if (!PhotonNetwork.offlineMode)
211         {
212             PhotonNetwork.networkingPeer.OpSetCustomPropertiesOfRoom(customProps, true, 0);
213         }
214         NetworkingPeer.SendMonoMessage(PhotonNetworkingMessage.OnPhotonCustomRoomPropertiesChanged, propertiesToSet);
215     }

OpSetCustomPropertiesOfRoom 162 lượt xem

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