Tasharen Entertainment Forum

Support => TNet 3 Support => Topic started by: lynohd on May 26, 2017, 09:41:17 PM

Title: onJoinChannel fired more than once?
Post by: lynohd on May 26, 2017, 09:41:17 PM
Hi,
for some reason when i use onJoinChannel it gets fired more than once
  1.  void OnNetworkJoinChannel (int channelID,bool succes,string message)
  2.     {
  3.         if (succes)
  4.         {
  5.             Debug.Log("Connected to Lobby: " + channelID);
  6.         }
  7.     }
  8.     private void OnEnable ()
  9.     {
  10.         TNManager.onConnect += OnNetworkConnect;
  11.         TNManager.onJoinChannel += OnNetworkJoinChannel;
  12.     }

(https://image.prntscr.com/image/c900c54b67ae4436b91693499c98b9ae.png)
Title: Re: onJoinChannel fired more than once?
Post by: devomage on May 27, 2017, 06:15:57 PM
I recently faced a similar problem.  Do you have the accompanying removal of the event trigger?

  1. private void OnDisable ()
  2. {
  3.         TNManager.onConnect -= OnNetworkConnect;
  4.         TNManager.onJoinChannel -= OnNetworkJoinChannel;
  5. }
Title: Re: onJoinChannel fired more than once?
Post by: lynohd on May 27, 2017, 06:49:09 PM
Yes I do.
Title: Re: onJoinChannel fired more than once?
Post by: cmifwdll on May 27, 2017, 11:37:08 PM
Multiple instances of the class?