Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

NetworkDiscovery pages don't mention Initialize()

Discussion in 'Documentation' started by eshan-mathur, Dec 31, 2015.

  1. eshan-mathur

    eshan-mathur

    Joined:
    Nov 22, 2011
    Posts:
    118
    The NetworkDiscovery pages in the Scripting API and the Manual don't mention the requirement of calling Initialize() before you use NetworkDiscovery. They only say that you must call either StartAsServer or StartAsClient, and then most likely you'll want to override BroadcastReceived, but you'll get an error if you don't call Initialize first.

    The closest thing you have is

    but that's hardly specific to calling the Initialize function.

    It wasn't until someone pointed it out to me on a forum question I asked did I even know that it was required. Without the call to initialize(), you get a very obtuse and unhelpful error about some missing topology.
     
  2. duck

    duck

    Unity Technologies

    Joined:
    Oct 21, 2008
    Posts:
    358
    Thanks for the detailed report, eshan. I'll make sure these pages are updated.
     
  3. dmitryon

    dmitryon

    Joined:
    Jan 6, 2018
    Posts:
    9