New NetworkDiscovery Error? : topology is not defined

When I call NetworkDiscovery.StartAsServer() or NetworkDiscovery.StartAsClient(), I get this error:

NullReferenceException: topology is not defined
UnityEngine.Networking.NetworkTransport.AddHost

There is nothing on Google about this error, which I find really strange. The NetworkTransport script isn’t open source like the HLAPI stuff, so I’m not even sure how to begin debugging it. I just call NetworkDiscovery.StartAsServer() on the click of a button, but it never gets farther than that.

If it helps, I noticed that during play mode the NetworkDiscovery component has a “-1” as it’s hostID.

1 Like

I was having the same issue.

For me, the fix was to first call discoveryManager.Initialize();

then start as a server or client.

hope that helps

1 Like

That fixed it. I wonder why this is not mentioned in the Manual for NetworkDiscovery.

I will try and submit that as an issue.

1 Like