- Home /
How do you load a single sprite from a multiple sprite sheet with script?
Honestly, no one as a suitable functioning answer to this but I am desperate because i have spent ages creating this sprite sheet and it would take ages to save them all as individuals.
the best i have is
Resources.Load("SpriteName")
this works for single sprites but not individual sprites from a multiple sprite sheet. Someone please help.
Answer by Klarzahs · Oct 01, 2020 at 10:15 AM
Hi @FirstTimeN00b
You can load the Spritesheet as a Texture3D and use Sprite.Create to "cut" parts out of the spritesheet.
The Parameter you want to look at is the rect one. Instead of going through the whole image like in the example, you would have to define start positions and width/height. I hope you created your spritesheet in a grid, otherwise this step will be tedious ;)
Your answer
Follow this Question
Related Questions
How do you load a single sprite, from a multiple sprite sheet, in a data base? 0 Answers
Multiple sprites load and placing 0 Answers
Changing "Sprite Mode" from Single to Multiple breaks reference to sprite sheet. 1 Answer
Resources.Load("sprite") returning nil 0 Answers
Sprite disappears on android 1 Answer