Add NOTIFICATION_PROCESS_MODE_ENABLED / DISABLED #12230
Closed
TAGames
started this conversation in
Engine Core
Replies: 2 comments 1 reply
-
Are you sure? They are called from |
Beta Was this translation helpful? Give feedback.
1 reply
-
@passivestar: My Test: @tool
extends Node
func _notification(what: int) -> void:
if what == NOTIFICATION_DISABLED:
print("disabled")
if what == NOTIFICATION_ENABLED:
print("enabled") |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Everytime you want to run logic when a node becomes "enabled/disabled" you have to manually create a function inside that nodes script and call it from somewhere else.
There is no notification when process_mode or physics_process_mode changes to disabled/inherited.
There are NOTIFICATION_ENABLED and NOTIFICATION_DISABLED but those are used when collision objects collisions get enabled/disabled.
And there are no engine callbacks like:
_on_enable()
_on_disable()
_on_process_mode_enabled()
etc.
What can I do?
Will node stashing solve this issue by having a callback for _stashed() and _unstashed()?
Beta Was this translation helpful? Give feedback.
All reactions