Difference between calling instanciate() and using new() for creating Control nodes in script

Godot Version

4.2.2

Question

I have a healthbar implemented as a TextureProgressBar with a script attaches with class_name Healthbar. When i try to instantiate my healthbar by loading it with a preloaded prefab it works normally but when I use Healthbar.new() it does not display at all. What could be causing this?

The scene has more data than the script alone. Including overriden properties like texture_under, texture_progress, and texture_over

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.