PhotonRoomProperties only accepts integer room properties
Fenda
✭
// Server PhotonRoomProperties token = new PhotonRoomProperties(); token.AddRoomProperty("t", 1); BoltNetwork.SetServerInfo(matchName, token); // Client foreach (var session in sessions) { UdpSession udpSession = session.Value as UdpSession; PhotonSession photonSession = udpSession as PhotonSession; if (photonSession.Properties.ContainsKey("t")) { Debug.LogFormat("T is {0}", photonSession.Properties["t"]); } }This works. But if I change the property from the integer 1 to a string, such as "foo", then it does not work..
0
Comments
-
This is on purpose. Use the session name and token as well.0
-
Sorry could you elaborate a little?
I tried to use RoomProtocolToken instead, which is shown in the samples and docs but the most important line doesn't seem to work as GetProtocolToken() doesn't exist.RoomProtocolToken token = photonSession.GetProtocolToken() as RoomProtocolToken;
0 -
make sure you have "using Bolt.Utils"1
-
Thanks!0
-
Ok - so there is no GetProtocolToken() function because its an extension method in "Bolt.Utils" - but shouldn't I be able to find that information in the docs ??0