My project has multiple sprites located in Assets\Sprites which I want to load using C# script.
I have tested this:
Sprite myFruit = Resources.Load <Sprite> ("Graphics_3");
But myFruit
is still null.
My project has multiple sprites located in Assets\Sprites which I want to load using C# script.
I have tested this:
Sprite myFruit = Resources.Load <Sprite> ("Graphics_3");
But myFruit
is still null.
Unity's scripting reference doesn't says that you need write
<Sprite>
right afterLoad
. So I had problem with loading sprites, although my sprite was in Resources directory.