V
V
Vladislav Kapralov2019-09-20 12:34:11
Unity
Vladislav Kapralov, 2019-09-20 12:34:11

How to erase a specific area of ​​a sprite in Unity?

I want to make an eraser that can erase the necessary part of the sprite (namely, the sprite).
How to implement it and what to use for this?
Is alpha worth it?
PS: I know how to adjust the alpha of a sprite, but I don't know how to change the alpha in a certain area

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2019-09-20
@Zorexo

Option one: use a shader. In which to transfer information about those areas that do not need to be displayed. You can transfer it as a thread of an array of bytes, or as a texture (which then should be editable, and then how it will affect performance).
Option two: edit the texture of the sprite itself at runtime.
Option three: a bunch of tiny sprites that will move away from the eraser.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question