예제 #1
0
 public void toggleHighlighting()
 {
     if (highlightMats.Count != 0)
     {
         if (state == highlightState.NotHighlighted)
         {
             for (int i = 0; i < renderer.materials.Length; i++)
             {
                 renderer.materials = highlightMats.ToArray();
             }
             state = highlightState.Highlighted;
         }
         else
         {
             for (int i = 0; i < renderer.materials.Length; i++)
             {
                 renderer.materials = originalMats.ToArray();
             }
             state = highlightState.NotHighlighted;
         }
     }
 }
예제 #2
0
 // Start is called before the first frame update
 void Start()
 {
     renderer = GetComponent <MeshRenderer>();
     state    = highlightState.NotHighlighted;
 }