I keep getting null instance on my UI and I'm not sure why.
I can provide more screenshots if needed.
It had originally worked just fine but after changing a few things around (sorry I don't really remember) it kept crashing.
The only differences I can compare from the start is that I saved it as a tscn and the panel has a script.
Also, I had another canvas layer earlier for UI Hearts that I deleted but that did not mess with the original code.
#Null Instance on UI
1 messages · Page 1 of 1 (latest)
That error doesn't seem like a null reference error, is the error you are talking about different from the one you have screenshotted? To fix the error you have in the screenshot replace line 14 with ```php
item_count_label.text = str(points) + " / 3"
or alternatively using format strings:
item_count_label.text = "%s / 3" % points
I'm not too sure sorry - This is the error I got even after trying to replace line 14 and I don't know what it isn't happy about
ok I've noticed that it's most likely a problem with my onready line 4
I just don't know why it can't find the path
Oh, scene unique names only work if the node with the script on it and the target are in the same scene file. You can't get them from everywhere
@formal helm
OMG u r so rite
the reason why I made it a subtscn was because the ui panel would lag A BUNCH and i didn't know if it was a probem with my code or a problem with my computer 😭 I'm gonna guess it's just my computer...