What is a Waypoint Graph and what problem does it solve?
What is a NavMesh?
How is State Machine AI done in Unity?
They help organize groups of UI elements
using UnityEngine.SceneManagement;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.UI;
using TMPro;
public class MenuItem : MonoBehaviour,
IPointerEnterHandler,
IPointerExitHandler,
IPointerClickHandler {
public Text regularUIText;
public TextMeshProUGUI tmpText;
public UnityEvent OnClick;
public void OnPointerEnter(PointerEventData eventData) {
tmpText.text = "...";
//...
}
public void OnPointerExit(PointerEventData eventData) {
//...
}
public void OnPointerClick(PointerEventData eventData) {
OnClick?.Invoke();
SceneManager.LoadScene("StartSceneName");
}
}
UI