OnPointerExit getting called when you click on a gameObject with the interface implemented.
Title pretty much says it all. I implemented the IPointerExitHandler interface and its associated function and it works as expected. But now I found out that the function is also called when you click on the object. Why is this the case? The pointer hasn't left the object its just clicked on it. Are there any solutions to this. I attempted to put a simple if statement in the function to check whether it is being clicked (GetMouseButtonDown, GetMouseButton and GetMouseButtonUp) but to no avail.
Can anyone enlighten me on this situation?
Your answer
Follow this Question
Related Questions
Tag calling is calling all my objects with the same tag 2 Answers
Calling a function from another script 0 Answers
What is the recommend practice to check condition? Before calling a function or on the function? 0 Answers
Buttons to make the ball move left and right 0 Answers
How should i go about having an object have 2 clickable areas? 2 Answers