OnMouseOver does not work

I’ve seen a lot of questions about OnMouseOver not working. I can’t get it to work either.

Here’s an extremely simple script attached to a Panel object

using UnityEngine;
using System.Collections;

public class MouseDetection : MonoBehaviour {

void OnMouseOver() {


And nothing appears in the console.

Wow, that many people didnt bother to read the docs :stuck_out_tongue:

It says for use with Collider or GUIElement. GUIElement is an actual thing by the way. Its part of the super-old Legacy GUITexture-esque system.

If you want to work on a Panel you must use a Pointer.


I’m hoping the info is contained in that video.

Anyway, its a duplicate question!