Hello.
So I need to get a texture from my resource folder, and I really can’t seem to get it to work.
I have a TextAsset with a file path for the texture, and… well it’s easier to just show my code:
string iconPath = variables[n].Remove(0, 5);
itemIcon = (Texture)Resources.Load(iconPath, typeof(Texture));
and from the TextAsset:
icon Sprites/maleBase/weapon/icon_gold_sword
variables[n].Remove(0, 5) removes the "icon " from the text.
So it should be Sprites/maleBase/weapon/icon_gold_sword
, but it still doesn’t work.
Any ideas?