PhotonRoomProperties only accepts integer room properties

edited March 23 in BOLT Engine
// 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..


  • This is on purpose. Use the session name and token as well.
  • 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;
  • make sure you have "using Bolt.Utils"
  • Thanks! :+1:
  • 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 ??
Sign In or Register to comment.