| Attention | Topic was automatically imported from the old Question2Answer platform. | |
| Asked By | Hamzalopode |
As you can see in the image, my _init() function is called twice. Is it a common error ?
If image doesn’t work:
<Node2D#49543120717> [{ "source": "res://Scripts/Ressource/Player.gd", "function": "_init", "line": 42 }, { "source": "res://Scripts/Ressource/Game.gd", "function": "@implicit_new", "line": 4 }]
<Node2D#49845110622> [{ "source": "res://Scripts/Ressource/Player.gd", "function": "_init", "line": 42 }]
Note: The script used isn’t attached to any Node, only used in another script like this:
var _player:Entity = Player.new()
The correct call is the first one.