Tugboat.cs "StopClient" throws exception on start editor play if ide debugger is attached to unity. #326
Closed
Baerikus
started this conversation in
Feature Request
Replies: 1 comment
-
Was a bug, and was resolved. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As the screenshot below shows, the "StopClient" function in Tugboat.cs at line 461 constantly throws a null reference exception if the IDE debugger (in this case rider) is attached to unity, and the editor play mode is started. A null check would prevent this and the need for interaction by continuing with F5 by the dev. The same could be valid for the "StopServer" function at line 431, but I did not specifically test it.
Changing:
return _client.StopConnection();
to:
return _client != null && _client.StopConnection();
Fixed the problem for me.
Beta Was this translation helpful? Give feedback.
All reactions