-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Labels
area:manualIssues and PRs related to the Manual/Tutorials section of the documentationIssues and PRs related to the Manual/Tutorials section of the documentationtopic:gdscript
Description
Your Godot version:
v4.5.beta.custom_build [2d113cc22]
Issue description:
In the GDScript docs for initialization order, it briefly mentions that exported variables are applied after _init
for instantiated scenes.
However, it is not clear that this also applies to the script field itself. This causes the original script's _init
to be called first, then the new script to be applied, then its _init
being called, which appears like a bug.
In addition, this means you should be very cautious using exported variables in _init
, since if that script is ever used in an instantiated scene, the values will not reflect the overridden values.
URL to the documentation page (if already existing):
Metadata
Metadata
Assignees
Labels
area:manualIssues and PRs related to the Manual/Tutorials section of the documentationIssues and PRs related to the Manual/Tutorials section of the documentationtopic:gdscript