Search Issue Tracker
Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.
Postponed
Votes
1
Found in
5.3.6p2
Issue ID
822355
Regression
No
SyncVar hook isn't called most of the time if SyncVar value is changed during scene change
Steps to reproduce:
1. Open attached project
2. Build and run project as host
3. In editor, open scene "SceneStart" and run it
4. Connect to chost
5. Return to build and start spamming "Enter scene 1"
6. In client (editor) notice that not all SyncVar changes are called
Reproduced with: 5.3.6p2, 5.4.0p1, 5.5.0a5
Comments (2)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Getting a deprecated package for JetBrains Rider pop up when opening or creating a project
- [Android] Volume level of the same audio file is different on Samsung Galaxy Tab A8 between 2023.3.0b3 and 2023.3.0b4
- ‘Expected end of value’ warning occurs when a property declaration includes five or more variable references
- Crash on BurstCompilerService::CompileAsync when entering Play mode in a specific scene
- InvalidOperationException when using Game Camera Preview in Scene window with a custom RenderGraph pass
Zullar
Sep 19, 2016 13:51
The SyncVar hook bug is also likely related to this bug.
https://fogbugz.unity3d.com/default.asp?831893_63262uhermqgeju4
Zullar
Aug 12, 2016 21:16
OnSerialize (with initialState=true) is sent on a scene change to all persistent DontDestroyOnLoad networked objects. I believe this is how the SyncVar value is changing on the client, without the hook being called. It appears that persistent DontDestroyOnLoad networked objects are being treated as new network scene objects and "spawned" when the new scene is loaded.