Author Topic: TNet 3 (Feb 11) OnNetworkConnect not firing?  (Read 2041 times)

Rogdor

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 14
    • View Profile
TNet 3 (Feb 11) OnNetworkConnect not firing?
« on: February 12, 2016, 07:13:07 PM »
Since I upgraded to the Feb 11 build of TNet 3 my OnNetworkConnect method isn't firing anymore. Has this changed, is there a new way to catch this event?

NeilM

  • Global Moderator
  • Newbie
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 7
  • Posts: 16
    • View Profile
Re: TNet 3 (Feb 11) OnNetworkConnect not firing?
« Reply #1 on: February 12, 2016, 07:25:22 PM »
Yes, the broadcasts were replaced with callbacks.

void OnEnable()
{
     TNManager.onConnect += OnNetworkConnect;
}

void OnDisable()
{
     TNManager.onConnect -= OnNetworkConnect;
}

Take a look in TNEventReceiver.cs for more details on which functions changed.