SyncVars should print a warning when it cannot find the corresponding object #333
Closed
nscimerical
started this conversation in
Feature Request
Replies: 1 comment
-
Added in 3.7.8. |
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
-
As recommended from #331, this is a feature request for SyncVars. Currently, the behavior of SyncVars when it cannot find the corresponding object (e.g. when syncing NetworkBehaviour references) is to silently set its own value to null. Situations like this can happen for example, when loading a massive scene and then spawning something on scene load. This obviously makes it very hard to debug when you experience this issue since there are no logs.
It should at minimum print a warning on the console that it cannot find the reference of the object at the current client. Which would be very helpful in identifying the main cause of the issue.
As for the caching of the ID values, I think that would introduce more complexity to it. And as you've said, will be a headache when the SyncVar is inside a class in a SyncList. A warning would be more than sufficient for my case.
Beta Was this translation helpful? Give feedback.
All reactions