A good user experience (UX) feedback technique is to visually indicate to the user when an object can be interacted with via the mouse. A common way to do this is to present an audio or visual effect when the mouse is moved over an interactable object.
We can create a Material object with a yellow color, which can make an object appear yellow while the mouse is over it, and then make it return to its original material when the mouse is moved away.
Create the MouseOverHighlighter C# script class with the following contents. Then, add an instance object as a component to each of the three 3D GameObjects:
using UnityEngine;
public class MouseOverHighlighter : MonoBehaviour
{
private MeshRenderer meshRenderer;
private Material originalMaterial;
void Start() {
meshRenderer = GetComponent<MeshRenderer>();
originalMaterial = meshRenderer.sharedMaterial;
}
void OnMouseOver() {
meshRenderer.sharedMaterial = NewMaterialWithColor...