Remove the extension (.png). This is because Resources loads “assets”, not files, the files per-se dont exist at runtime, just their asset representations.
For example, a project may have Resources folders called Assets / Resources/ and Assets / Guns / Resources/ .
The path does not need to include Assets and Resources in the string, for example loading a GameObject at Assets / Guns / Resources / Shotgun.prefab would only require Shotgun as the path .
Also, if Assets / Resources / Guns / Missiles / PlasmaGun.prefab exists it can be loaded using Guns / Missiles / PlasmaGun as the path string.
If you have multiple Resources folders you cannot duplicate the use of an asset name.
Generally don’t guess when programming. Yes you can, but when something doesn’t work, recognize that you guessed at something and immediately check the documentation.
You really owe it to yourself to start with the docs for Resources.Load() which actually contains example code and shows precisely the two ways your line above is incorrect.
Additionally, you may wish to keep this in mind:
Always use Resources.Load<T>(), never use Resources.Load() as T
And the same goes for Resources.LoadAll<T>()
Generally you want to avoid writing code that is simply waiting to mysteriously fail simply by the future appearance of an identically-named file of a different type.
ALSO: Always put your resources in type-ish subfolders if you use Resources.LoadAll(). Here’s why:
As of this writing, if you use Resources.LoadAll<T>("foldername/");, Unity will load ALL FOUND ASSETS at that path into memory, then check each type and only return to you the ones that meet type T. But Unity will have already loaded all the assets it finds in that path, so expect massive performance problems if you don’t use subdirectories, even crashes due to running out of memory if you have a lot of assets there.