The "OnMouseOver" function won't work for UI objects

I am trying to make an object appear and disappear when i hover over an UI object. When I tried this nothing happened when ran with the “OnMouseOver” function on the UI object as if the script was not there.

Would implementing IPointerEnterHandler work for your purposes?

Indeed, OnMouseOver can’t be used for UGUI objects. You have to implement the IPointerEnterHandler interface.

Cheers,
Sam