When developing any type of user interface, it's important to provide a system to help guide the experience. In a virtual setting, this is even more important if the user's input method is a Gaze Input.
Without direct input (like a mouse and cursor), we need to create an indirect method which is just as effective. For this project, we'll use a visual glow to indicate when a selectable object is being gazed upon by the user. In the following code snippet, OnPointerEnter and OnPointerExit functions, provided by the EventSystem, will be our feedback mechanism. With these functions, we will add a highlight material and stroke to the selectable GameObject:
- Add the following functions after OnPreviewClick():