Hello my UI design is kind of crippled at the moment because IPointerEnterHandler has just stopped working in general. IPointerExitHandler still works. It doesn’t matter how many test objects I make, or different scripts, it’s the same result. I’ve tested this with Debug, but have no idea what would cause it. The methods were created by right clicking on the IPointerEnterHandler and getting c# to make it.
I do not know how to debug this. All I can tell is that PointerEnterHandler doesn’t fire at all, but IPointerExitHandler works fine. Can someone help? It was previously working, and then just stopped.
You tested it in a controlled environment?
Yep. It works fine in my test project. Just not my main one.
Then look at the differences in your test project and your problem project to determine the cause. It’s just a process of elimination.
Ok, I totally disabled everything in my scene, and made a brand new canvas. I then added this brand new script to a new standard image with a 2d Box Collider. It still only notices the exit. I think something deeper is going on here than just my code. I think it might be that thing where I accidently miss clicked on some sort of ‘linking system’ in Visual studio. I think there may be some sort of unnamed overide in some file and I don’t know how to find it.
public class mouseOver : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
public void OnPointerEnter(PointerEventData eventData)
{
Debug.Log("Enter");
}
public void OnPointerExit(PointerEventData eventData)
{
Debug.Log("Exit");
}
}
SOLVED IT
So I was right to begin with. Lol Here’s what happened: When I clicked on the pointer originally, it created a new interface with the same name and I never really saw what happened. This overode the real script Turns out I just needed to delete this from my project:
