- Home /
2D Game. Want to make part of a sprite transparent on runtime.
Hello, I should first make it clear that I'm looking for the method to use for my issue, since this is the first time I'm trying to edit a 2d sprite. So, I have 3 red cubes here, and 1 black. The black cube is a layer behind the red layer, and when it's behind, I I need the red cubes to be see through, but only where the black cube is overlapping. The black cube's position will change over time, so this has to be realtime.
So this is how far I've got, by just setting the alpha for the whole object.
Can I create a SpriteMask and use that for my purpose?: https://docs.unity3d.com/Manual/class-SpriteMask.html
Any answers, help or suggestions would be greatly appreciated.
Your answer
Follow this Question
Related Questions
An edge disappears from a sprite in GamePlay mode. 1 Answer
SpriteRenderer is gone when I change in script. 1 Answer
WebGL sprite appears pink? 0 Answers
Unity 2d space between sprites 1 Answer