Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes, Register fails with message Object reference not set to an instance of an object #3

Open
yong2khoo88 opened this issue Apr 24, 2022 · 0 comments

Comments

@yong2khoo88
Copy link

yong2khoo88 commented Apr 24, 2022

image

As titled, sometimes the Register function just fails with the message, which, is outside the callback.
Here's my code

 public void RegisterPlayer()
    {
        Debug.Log("Registering...");
        NetworkClient.Lobby.Register(CurrentPlayerName, (successful, reply, error) => {
            if (successful)
            {
                Debug.Log($"Lobby registered roomId: {reply.roomId}, started: {reply.started}");
            }
            else
            {
                Debug.Log("Lobby failed to register " + reply);
            }
        });
    }

I expect it at least appears after "Lobby failed to register".. but it seems to totally throw the exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant