I have one big spritesheet which has enemies, player, objects, platforms etc. on it in one block.
I want to separate out player sprites, enemy sprites, ground sprites etc. into different objects/textures.
How do I do this?
I have one big spritesheet which has enemies, player, objects, platforms etc. on it in one block.
I want to separate out player sprites, enemy sprites, ground sprites etc. into different objects/textures.
How do I do this?
Hi @TomMakesGames ,
(1) From point of rendering graphic (reducing amount of draw calls) having biger texture with many small inside is beter than having few… but if you need edit it totally and cut to few separate files use Gimp, Paint… etc
(2) If you have one file with many small graphics, try to use sprite mode Multiple and map sprite for different objects… it’s really simple and will allow you to optimise your project
When you select sprite in Unity, change SpriteMode to Multiple. Then hit SpriteEditor bellow.
If you don’t use it already, will need to import it. Use option Slice, and chose size, etc.
When you finish, in unity resources when you click edited sprite, will you have all of the cuted sprites… And gest bart is than graphic cart will try to render them together.
Hope that help.
So, coming back here after doing something else and realising the solution…
You can have one spritesheet like shown.
All these are different objects, but they are all referring to the same sprite sheet for their visual appearances.
I didn’t realise this was so easy until just now. And as others say - this should be more performant.
Hi @privatecontractor, and thanks for replying.
I know how to do all of that - the importing, slicing etc. But then I end up with 1 big spritesheet with 400 or so sprites in it.
But how can I separate out the player character sprites to go with a player character gameObject? Or the enemy? Or separate out the background, foreground tiles etc.
In another scenario, I might have downloaded 15 frames for a player, another 20 frame sprite sheet for an enemy, and so on. But here they’re all included in one massive one. I get the point about draw calls. So is there a way to point/reference certain frames/sprites in this one spritesheet from another object then? Is that the best way? Or am I better off just manually dividing this up in GIMP etc.?
I’ve attached what I had already. But what’s the best way to partition this out for the various functions represented here?
Hope that all makes sense!
Another thing you can do is edit the .meta file. It is a text file and look for the section spriteSheet: Then you will see name: where you can change them however makes you happy in the Unity asset view.