- Home /
UI image with 2d collider possible?
I made a game where you can drag your camera around with a mouse, but i dont want this script to be active when you are hovering over UI.
I tried using OnMouseOver() to detect the UI, but in play mode the 2d boxcollider doesnt scale the same as the UI sprite it is attatched to.
Is there a way to make the 2d collider always the same size as the UI sprite? or is there another way to detect this?
Comment
Your answer
Follow this Question
Related Questions
Accessing RectTransform Rotation? 1 Answer
Sprite Render and UI Image with Pattern Texture 0 Answers
UI image always behind quad 0 Answers
Canvas Screen Space Issue 1 Answer