Nullref Exception NGO

Hello!
I am having this issue with unity where if I try to connect to a lobby. I have followed the code exactly as described in the NGO course, but for some reason I am getting an error when the other client tries to connect to me, and it’s the following:

I was wondering if anyone had any clue as to waht this error could refer to?
It looks like it’s code from unity that is not set to instance of an object, so I am trying to figure out what is happening.

Thank you in advance!

Can you share your code for the connection approval? It looks like there is a warning that the connection approval callback is not defined, that could probably cause a null error if the game tries to execute the callback.

In the NetworkServer Constructor we set the callback in the following line:
networkManager.ConnectionApprovalCallback += ApprovalCheck;

Actually I managed to solve it, I am dumb. It was that I had forgotten to spawn the server manager all along.
It works now though, thanks!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms