OnMouseEnter() Help Please.

Basicly I’m now getting used to the new UI, and I’m trying to use this function but nothing is happening, I have a box collider on the UI object and I’ve tested it with and with out on trigger selected please help I’m new to the new UI

using UnityEngine;
using System.Collections;

public class SlotController : MonoBehaviour
{

   
    void Start ()
    {
   
    }

    void Update ()
    {
   
    }

    void OnMouseEnter()
    {
        transform.parent.GetComponent<InventoryController> ().selectedSlot = this.transform;
    }

    void OnMouseExit()
    {
        transform.parent.GetComponent<InventoryController> ().selectedSlot = null;
    }
}

isn’t that from the old legacy GUI system?

I dont think so? not sure but any help?

looks like

lol and i spy a boredmormon in there too :stuck_out_tongue:

Some of the instructoins are very unspecific