godotengine / godotengine/godot
`_init()` called twice when extending script in inherited scene
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
4.5 dev4
### System information
W10
### Issue description
When you make inheriting scene and extend the base scene's script, the `_init()` method of the base script is called twice.
### Steps to reproduce
1. Create a scene
2. Add a (non-built-in) script with `_init()` method that prints something
3. Create another scene inheriting that scene
4. Extend the script, can be empty
5. Run the inheriting scene
### Minimal reproduction project (MRP)
[initwice.zip](https://github.com/user-attachments/files/20504752/initwice.zip)
Inheritor.tscn is scene with bug.
NotInheritor is equivalent scene, but without inheritance. No bug.
Contributor guide
Assessment
This issue has not been assessed yet.