I am trying to get a reference to a prefab called health_bar. For some reason, it isn’t load. It returns null. Have I missed something? Is the filepath wrong or is it something else?
Resources must be in a folder named „Resources“ and the path is then relative to the „Resources“ folder.
Yes, and adding to CodeSmile, you do not supply the file extension.
You will find you save yourself a LOT of time by going to the docs and reading the requirements for any new API you contemplate using.
You may also find guidance by looking at the example code. In the case of Resources.Load() it’s very clear.
Finally, photographs of code are not a thing.
If you post a code snippet, ALWAYS USE CODE TAGS:
How to use code tags: https://discussions.unity.com/t/481379
