-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Deprecate Resource.setup_local_to_scene
#67082
Deprecate Resource.setup_local_to_scene
#67082
Conversation
9571884
to
4228937
Compare
Rebased. Bumped. |
4228937
to
8cc52d6
Compare
Makes sense, but the method can't be removed, because it breaks compatibility. You can deprecate it and make no-op. |
As a reminder, deprecating means that the functionality still exists, but may be removed in the future. If it's made no-op, there's no point in keeping it, as it breaks compatibility anyway (breaks projects that use it). |
8cc52d6
to
ea0f6e9
Compare
setup_local_to_scene
setup_local_to_scene
As edited above: This PR has been updated to deprecate instead of removing. Compatibility is no longer broken because the method still works, but use is discouraged. |
61d207d
to
93bf474
Compare
93bf474
to
acd3851
Compare
Good riddance. Also modifies a note in ViewportTexture
acd3851
to
0af2467
Compare
Merged too soon? I suppose the description can be changed on the other PR. |
Yeah I forgot to remove it from my merge queue after commenting :) |
setup_local_to_scene
Resource.setup_local_to_scene
This PR has been updated to deprecate instead of removing. Compatibility is no longer broken because the method still works, but use is discouraged.
Continuation of #67080 and in a way, #67072.
To quote myself from Godot's RocketChat:
Above, I mentioned that it was a struggle to explain properly. And that is because it currently does something really trivial: emit the
setup_local_to_scene_requested
to potentially perform custom user logic. But internally, it is expected to be called only once duringPackedScene.instantiate()
.Because the user may also call it whenever they want, they need to understand the occasion the engine expects it to be called. Specifically, deserialization of a
local_to_scene
resource. But again, if the user is writing custom serialization for a Resource for whatever reason, they will write their own methods to do it, without ever callingsetup_local_to_scene
!In conclusion, good riddance, please!... See you in Godot 5...!