1
TNet 3 Support / Re: Changing Channel gameName after creation from Host
« on: July 25, 2016, 06:39:42 AM »
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:
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:
When the host starts I add a new snippet to the Channel's data:
- if (NetworkGameSettings.Instance.SelectedGameType == NetworkGameSettings.GameType.Internet)
- {
- TNManager.SetChannelData("inProgress", true);
- }
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:
- foreach (Channel.Info info in channelList)
- {
- /* ... */
- if (info.data != null)
- {
- if (info.data.Get("inProgress") != null)
- {
- data.GameName = Constants.SERV_IN_PROGRESS + info.gameName;
- }
- }
- /* ... */
- }
