blob: f1b1bcc1f3d3b9263f9f2029933f14bf2c0440a0 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 | using UnityEngine;
namespace Pathfinding.Examples {
	/// <summary>Activates a GameObject when the cursor is over this object.</summary>
	[HelpURL("https://arongranberg.com/astar/documentation/stable/highlightonhover.html")]
	public class HighlightOnHover : VersionedMonoBehaviour {
		public GameObject highlight;
		void Start () {
			highlight.SetActive(false);
		}
		public void OnMouseEnter () {
			highlight.SetActive(true);
		}
		public void OnMouseExit () {
			highlight.SetActive(false);
		}
	}
}
 |