using System.Collections; using System.Collections.Generic; using UnityEngine; public class cs01 : MonoBehaviour { public void showBlue() { GameObject.Find("Cube").GetComponent().material.color = Color.blue; GameObject.Find("Cube").GetComponent().Play(); } public void showRed() { GameObject.Find("Cube").GetComponent().material.color = Color.red; GameObject.Find("Cube").GetComponent().Play(); } }