- Home /
Question by
Chris_E · May 07, 2016 at 04:22 PM ·
guispritetransparencyevents
Ignore transparent areas of sprites in uGUI
I need the mouse events (over/highlight/press) to only trigger if I'm in the colored area of a sprite, and ignore the transparency.
To give you an idea of what I'm trying to achieve/why I need this: Imagine a map of the US. Each state is a separate sprite which I want to be intractable. If you look at states that are next to each other like Oklahoma and Texas there's an issue with overlap if each uses a rectangular sprite that doesn't ignore transparent areas.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612080335im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to create a GUI like Zombieville? 1 Answer
Gui Box - Texture - Spritesheet 0 Answers
Quick GUI Texture Question 0 Answers
Displaying Prefab Sprite as Texture on GUI Elements 0 Answers
Sprite editor and texture 1 Answer