# Start Broadcast Unity Network Discovery

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.

• 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! Jul 17, 2017 at 17:33
• @pudility do you have any code efforts that you can share? Jul 18, 2017 at 6:21