-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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 UID support in MultiplayerSpawner #99712
Fix UID support in MultiplayerSpawner #99712
Conversation
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.
Pressing the "Add Element" button in the inspector now spams:
ERROR: Condition "!unique_ids.has(p_id)" is true. Returning: String()
at: get_id_path (core/io/resource_uid.cpp:133)
ffba7c3
to
4fdb8ad
Compare
4fdb8ad
to
67b95f3
Compare
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.
Core changes look good to me.
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.
LGTM, thanks!
Thanks! |
Fixes #99706
The bug occurred because setting a path will use
_set()
on path index, instead of_set_spawnable_scenes()
. idk how I missed it previously.The main problem is that MultiplayerSpawner must operate on paths, but the editor wants it to store the paths as UID. I removed the uid field added in #99137. Now all paths are stored as paths internally, but saved as UID, with the conversion happening inside setters/getters. This might affect scene loading, but shouldn't impact performance of the spawner's operation.