Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - BigHandInSky

Pages: [1]
1
Update: Made a workaround for this by using the Channel Data:

When the host starts I add a new snippet to the Channel's data:
  1. if (NetworkGameSettings.Instance.SelectedGameType == NetworkGameSettings.GameType.Internet)
  2. {
  3.     TNManager.SetChannelData("inProgress", true);
  4. }

Then given some time spent getting errors from the data not existing until the host starts, I use this to check for whether that snippet exists during our loop through the discovered channels:
  1. foreach (Channel.Info info in channelList)
  2. {
  3.     /* ... */
  4.                
  5.     if (info.data != null)
  6.     {
  7.         if (info.data.Get("inProgress") != null)
  8.         {
  9.             data.GameName = Constants.SERV_IN_PROGRESS + info.gameName;
  10.         }
  11.     }
  12.  
  13.     /* ... */
  14. }

2
TNet 3 Support / Changing Channel gameName after creation from Host
« on: July 25, 2016, 05:03:40 AM »
Hello all,

I've been looking through the documentation and this forum for an answer to the following question:

How do I change a Channel's gameName after I create it, such that when I get Channel.Info.gameName, that will have changed accordingly?
Or should I look to changing the Channel's data?

For reference:
We have a game that can be connected to from a server browser, and to stop people joining mid-game I'm setting up the browser such that when the Host starts a game, they change the channel name to "[IN PROGRESS]" + sessionScript.gameName, so when the channel is fetched by the browser it displays the Channel.Info.gameName string, checks for the prefix, then disables the interactable of that browser entry if it is there.

Thanks in advance for any help.

Pages: [1]