using System.Collections; using System.Collections.Generic; using UnityEngine; public class IndicatorLight : MonoBehaviour { // No changes needed here public bool IsOn = false; public Material OnMaterial; public Material OffMaterial; public int MaterialSlot = 2; private MeshRenderer r; private Material[] mats; void Start() { // No changes needed here r = this.GetComponent(); } void Update() { // TODO: UNCOMMENT and fix the code below so that the correct material is shown /* mats = r.materials; if(____) { // set material when it is on mats[MaterialSlot] = ___; } else { // set material when it is off mats[MaterialSlot] = ___; } r.materials = mats; */ } }