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.


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 '17 at 17:33
  • \$\begingroup\$ @pudility do you have any code efforts that you can share? \$\endgroup\$ – Fabio S. Jul 18 '17 at 6:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.