godotengine / godotengine/godot-docs
Container nodes in instanced scenes get their attributes from parent after _ready()
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
Problem I'm facing:
I need a scene to measure its rect_size and alter its children depending on this value.
The root node of the scene is of type MarginContainer and the size of the instanced
version of this scene is manually altered in the main scene in the editor.
When trying to measure its rect_size in _ready(), the size prints out the value what its original
default size is defined as in its own scene.
When measuring the size through a call_deferred() function, it reports correctly its size what it
has been set to manually in the parent node.
This information should be included into the containers documentation, that containers get their size properties as defined by their parent scene after all tree building has been done, specifically directing to use the call_deferred() function when dealing with container sizes upon initialization.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.