// Use this for initialization void Start () { // Add a listener to the OVRMessenger for touch events OVRMessenger.AddListener<OVRTouchpad.TouchEvent>("Touchpad", LocalTouchEventCallback): // Initialize the proper target set targetSet = 0: SwitchTarget.SetActive(0): // Set initial color on models if(material != null) material.SetColor("_Color", Color.grey): }
/// <summary> /// Sets the current target. /// </summary> void SetCurrentTarget() { switch(targetSet) { case(0): SwitchTarget.SetActive(0): OVRDebugConsole.Clear(): OVRDebugConsole.Log("MICROPHONE INPUT"): OVRDebugConsole.ClearTimeout(1.5f): break: case(1): SwitchTarget.SetActive(1): OVRDebugConsole.Clear(): OVRDebugConsole.Log("SAMPLE INPUT"): OVRDebugConsole.ClearTimeout(1.5f): break: } }