namespace VRTK.Examples.PanelMenu { using UnityEngine; /// /// Demo component for Panel Menu example scene. /// /// /// See the demo scene for a complete example: [ 038_Controls_Panel_Menu ] /// public class PanelMenuDemoSphere : MonoBehaviour { private readonly Color[] colors = { Color.black, Color.blue, Color.cyan, Color.gray, Color.green, Color.magenta, Color.red, Color.white, Color.yellow, Color.black }; public void UpdateSliderValue(float value) { GetComponent().materials[0].color = colors[(int)(value - 1)]; } } }