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

Enable and disable networked objects #609

Closed
James-Frowen opened this issue Feb 18, 2021 · 3 comments · Fixed by #759
Closed

Enable and disable networked objects #609

James-Frowen opened this issue Feb 18, 2021 · 3 comments · Fixed by #759
Labels

Comments

@James-Frowen
Copy link
Member

James-Frowen commented Feb 18, 2021

As a game dev, I want to enable and disable networked objects so that I can control when user can see them.

Explanation

Currently Mirage takes over enable/disable. All scene objects get disabled when the game starts and are enabled when the user connects.
The user therefore cannot control when objects are enabled/disabled as it interferes with the scene object mechanism.
This also makes for a very complicated way to control objects.

discussions about NetworkScenePostProcssing: #608

  • this feature is left over from UNET, hard to know the reason for the initial feature

Acceptance criteria

When a spawned object is disabled in the server, Mirage disables it in the client
When a spawned object is enabled in the server, Mirage enables it in the client
When the user starts the game, the scene objects should not be visible until he connects to the server

@James-Frowen
Copy link
Member Author

James-Frowen commented Feb 18, 2021

Possible Solution:

  • remove this feature
  • Add to migration guide

@paulpach paulpach changed the title Disable scene objects at build time Enable and disable networked objects Feb 18, 2021
@uweeby
Copy link
Member

uweeby commented Feb 20, 2021

I did a test solution comparing the current vs not doing the disable/enable with NetworkScenePostProcess and ServerObjectManager.

I used the ChangeScene example. In Room1 and Room2 I added 1000 SceneObjects. I ran the server in server only mode. I put a Stopwatch at the start and end of SpawnObjects().

Current: 24-26ms scene changes
Dont Disable: 17-19ms scene changes

roughly 30% faster

@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2021

🎉 This issue has been resolved in version 86.0.2 🎉

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

Successfully merging a pull request may close this issue.

2 participants