鼠标移到物体上
OnMouseEnter()
OnMouseExit()
检测鼠标是否在UI上
using UnityEngine;
using UnityEngine.EventSystems;
EventSystem.current.IsPointOverGameObject()
把物体的材质设为红色
private Renderer rendererer ;
renderer = GetComent<Renderer>();
renderer.material.color = color.red;