-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
fix: character spawner fix #946
Conversation
… during scene loads this wont ever register again. Need to change it on scene changes. Signed-off-by: dragonslaya <dragonslaya.ss@gmail.com>
@@ -100,6 +91,15 @@ private void OnServerStarted() | |||
/// <param name="sceneOperation">The type of scene load that happened.</param> | |||
public virtual void OnClientFinishedSceneChange(string scenePath, SceneOperation sceneOperation) | |||
{ | |||
if (ClientObjectManager != null) | |||
{ | |||
ClientObjectManager.RegisterPrefab(PlayerPrefab); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would register the prefab multiple times, Might be better to register it once when the client starts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It currently registers everytime scene changes. Mirage itself calls register prefabs internally in clientobjectmanager. This is why i had to move this here. So we either need to change how mirage registers to once in clientobjectmanager or we need to do this. I trace it and every time player bit join then disconnect and join it called register spawn in that class
Signed-off-by: dragonslaya <dragonslaya.ss@gmail.com>
Co-authored-by: James Frowen <jamesfrowendev@gmail.com>
Kudos, SonarCloud Quality Gate passed! |
🎉 This PR is included in version 105.1.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
character spawner was registering the player prefab in awake an during scene loads this wont ever register again. Need to change it on scene changes.
Fixes #945
Signed-off-by: dragonslaya dragonslaya.ss@gmail.com