- Home /
Scroll View and Hiding Sprites
I am making a "How To Play Panel" for my game. I was trying to use the scrollview or rectview so I could put all of the instructions in one panel and allow the user to scroll through. When scrolling down the text disappears, but the sprites remains visible. It looks awful! I have several sprites (one being a mobile device) showing how to control the character. I have watched many tutorials and done research online and it seems like this might NOT be possible (unless you download a paid plugin). I could make multiple panels that the player can see (activate and deactivate one panel when the next button is pressed), but this scrollview is a lot more convenient and cool! Is it possible to mask the sprite just like the text when scrolling up and down?
Here is a link to a video of my issue: https://youtu.be/fKTfC7nGEP0
Answer by wojtask12 · Jun 14, 2016 at 09:35 AM
ok, you use Sprite Renderers which is not UI component inside your Canvas, that's why your mask doesnt affect these pictures. Use UI.Image component instead of SpriteRenderer, and it whould work
This worked! Thank you! If you change this comment to an answer I will mark it!!
Answer by wojtask12 · Jun 13, 2016 at 10:59 PM
You need UI Mask component, check it out https://unity3d.com/learn/tutorials/topics/user-interface-ui/ui-mask
Your answer
Follow this Question
Related Questions
Dynamic sprite mask 1 Answer
How to use multiple Sprite Mask ? 2 Answers
Using Tilemap as sprite mask? 1 Answer
How to prevent transparent objects overlap 0 Answers
Sprite Mask seems to override Sorting Layer preferences... 0 Answers