You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to have a variable that tools can use to track state that can change from within the editor. For example:
func _enter_tree():
counter+=1
_enter_tree will be called once by the editor, and then once by the game. But counter will be reset to 0 when the game is run. A flawed workaround does exist using export, ie
export var counter = 0
func _enter_tree():
counter+=1
but this causes the variable to be editable from within the editor's Inspector, which is not ideal for a variable meant to track the internal state of the node. I request something like maybe this:
export (null) var counter = 0
func _enter_tree():
counter+=1
which prevents the variable from appearing in the Inspector.
The text was updated successfully, but these errors were encountered:
How about using Engine.is_editor_hint() to distinguish between counter updates? But I guess you want something more than that?
I think it is really unintuitive to have an export variable that is NOT appearing in the editor sidebar....
It would be useful to have a variable that tools can use to track state that can change from within the editor. For example:
_enter_tree will be called once by the editor, and then once by the game. But counter will be reset to 0 when the game is run. A flawed workaround does exist using export, ie
but this causes the variable to be editable from within the editor's Inspector, which is not ideal for a variable meant to track the internal state of the node. I request something like maybe this:
which prevents the variable from appearing in the Inspector.
The text was updated successfully, but these errors were encountered: