I am using the unity NetworkDiscovery component, and I am wondering how I can auto-start broadcasting when the server starts, instead of the client having to click on the gui: Initialize Broadcast => Start Broadcasting. I would like to be able to put some C# in my start host function so that the user does not have to do anything.


1 Answer 1


Couple of ideas, if possible subscribe to a "Start server event", if thats not available, you could try a Timer , onElapsedTime event and try connectiong every few seconds, until it works, and when it does turn the timer off.

  • \$\begingroup\$ Sorry for my late reply. I am a bit new to unity and I am wondering how exactly I would go about doing this? Could you give me some example code? Thank you! \$\endgroup\$
    – zoecarver
    Jul 17, 2017 at 17:33
  • \$\begingroup\$ @pudility do you have any code efforts that you can share? \$\endgroup\$
    – Fabio S.
    Jul 18, 2017 at 6:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .