After following the official tutorial [Tutorial: Script Course #4 — Let’s Create a UI] to create the health bar, the project outputs an error every time it is run:
The error is: [ImageGauge] target object not found. [ res://sampleobject/Object_Sampleplayer.tscn ].
[ImageGauge] target object not found. [ res://sampleobject/Object_Sampleplayer.tscn ].
However, as soon as I delete the ImageGauge node corresponding to the health bar UI, the project runs normally without errors. But as soon as I restore that node, the error reappears. What is causing this? The object settings should be correct according to the tutorial. Is there an issue with the settings shown in the image? Or is there another reason?
I had an error too. For some reason it went away after I changed the ‘hp’ variable to something else and tried to playtest. I then changed it back to ‘hp’ and it worked. Can you see if that works?
I wonder if the default ‘hp’ id is getting stuck on initialization.
It is also strange that the object_id is not one of the options on the variable id until you get off hp and then try to select again. I think the variable id enum is initializing incorrectly.
Thank you! That did indeed seem to clear the first error and restore functionality however it throws out a new error. Fortunately the new error does not seem to hinder any functionality.