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

Server doesn't work after re-entering play mode with Fast Domain Reload #547

Closed
Jobus0 opened this issue Jan 24, 2021 · 3 comments
Closed
Labels

Comments

@Jobus0
Copy link
Contributor

Jobus0 commented Jan 24, 2021

Describe the bug
After hosting the server, disconnecting, exiting play mode, and then entering play mode again, the server fails to work correctly again until a domain reload has been triggered or editor is restarted.

While broken, Server.Active will go true, but PlayerSpawner does not spawn the player, and after disconnecting again, Server.Active will incorrectly stay true.

I've tried with Kcp, IgnoranceNG, and Websocket. The bug happens to the first two, but not to Websocket. From what I can tell, the bug is identical between Kcp and IgnoranceNG. However, if one triggers the bug with either of those two, and then switches to Websocket, then it will also be broken. But Websocket never triggers the bug itself.

Repro project
MirrorNG Test.zip

Simple project with three scenes (based on Mirror's "Basic" example), one for each transport, but otherwise identical.

To Reproduce
Steps to reproduce the behavior:

  1. Open the attached project.
  2. Open the "Kcp" scene.
  3. Enter play mode.
  4. Click "Start Host" button and notice "Server Active: True" and the "Player 01" UI element.
  5. Click "Stop Network" and notice "Server Active: False".
  6. Exit and re-enter play mode.
  7. Click "Start Host" button and notice "Server Active: True", but no "Player 01".
  8. Click "Stop Network" and notice "Server Active" is still "True".

Expected behavior
Starting host should spawn a player every time, and stopping network should set "Server Active" to False every time.

Desktop (please complete the following information):

  • OS: Windows 10
  • Build target: Editor
  • Unity version: 2020.1.16
@paulpach
Copy link
Contributor

I downloaded the sample project, but it does not have a scene

@Jobus0
Copy link
Contributor Author

Jobus0 commented Jan 30, 2021

In the .zip there are Websocket.unity, Kcp.unity and IgnoranceNG.unity. So there are three scenes. Do those not load in the editor for you? They're in the Assets folder root.

github-actions bot pushed a commit that referenced this issue Jan 30, 2021
## [62.9.5](v62.9.4...v62.9.5) (2021-01-30)

### Bug Fixes

* bug cleaning up networkscenemanager ([8db98db](8db98db))
* fast domain reload with Kcp ([bd3676d](bd3676d)), closes [#547](#547)
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 62.9.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

No branches or pull requests

2 participants