- Home /
Question by
BeefEX · Dec 15, 2015 at 09:30 PM ·
unity 5spriteresources.load
Resources.Load() problem
Hi, i want to load texture from Resources folder but it fails. Any ideas? Thanks
CODE: sprite = Resources.Load ("Sprites/Tiles/" + SpriteFileName.ToLower()) as Sprite; (SpriteTileName is for example "dirt".)
This is my "dirt.png" file location: Assets\Resources\Sprites\Tiles\dirt.png
When i try to use this sprite, i get error "Object reference not set to an instance of an object"
Comment
Your answer
Follow this Question
Related Questions
Instantiated object not showing in scene or hierarchy 2 Answers
Resources.Load specific sprite in texture sprite mode multiple 1 Answer
How can I change the sprite using an image URL? 1 Answer
[C#]Adding a Sprite from a Resources.Load("Path") : How does it work ? 3 Answers
png file's inspector is blank! 0 Answers