- Home /
How I can apply a shape to a sprite ?
I want to create a sprite, and apply it a shape without create a sprite for each shape. It's possible on spriterenderer ? or another way ?
A SpriteRenderer uses a Sprite (specific form of a texture) to show it's content. I don't know exactly what you mean by shape, but I think you want to show a circle, a square, a star? or whatnot. And if you're not creating those as a Sprite, you cannot display them as one.
Since a sprite is essentially a rectangle displaying textures, the only other way to form shapes is by generating the shape as a mesh, using a $$anonymous$$eshRenderer and assinging it a one color material. The difference is texture on a reactangle vs. mesh already in the correct shape.
Okay, thank for your answer. I think, I will just use an Editor-app to create Automatically my sprites.
Your answer
Follow this Question
Related Questions
Change SpriteShape texture at runtime 0 Answers
Creation of Edge Colliders at Runtime 0 Answers