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
There are cases when the setter will run twice (as evident by double print). This happens when you attach the script to a node and save as scene, then instantiate the scene in another scene, set the property to a different value in the inspector and extend the script. When you run the scene, the setter will be called with the default value and then your exported value.
I'm not sure about this, but I think this is an intended behavior. Godot first loads the instanced scene without overrides, which causes the first print, and then applies the override, causing the second print. Again, this is only my hypothesis, it's possible that it is not intended.
Tested versions
4.4 dev7 and earlier
System information
W10
Issue description
Given this simple script:
There are cases when the setter will run twice (as evident by double print). This happens when you attach the script to a node and save as scene, then instantiate the scene in another scene, set the property to a different value in the inspector and extend the script. When you run the scene, the setter will be called with the default value and then your exported value.
Steps to reproduce
Run MRP.
Minimal reproduction project (MRP)
SetterBug.zip
The text was updated successfully, but these errors were encountered: