AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
WidgetActivateInputHandler.cs
Go to the documentation of this file.
1 using ARDesign.Widgets;
3 using System.Collections;
4 using System.Collections.Generic;
5 using UnityEngine;
6 
7 public class WidgetActivateInputHandler : MonoBehaviour, IInputClickHandler
8 {
9 
10  private bool isEnable = false;
11  [SerializeField]
12  private WidgetHandler parent;
13 
14 
15  // Responds to taps from user: enables or disables widget depending on current state
16  public void OnInputClicked(InputClickedEventData eventData)
17  {
18  parent.EnableWidget(!isEnable);
19  isEnable = !isEnable;
20  }
21 }
void OnInputClicked(InputClickedEventData eventData)
Interface to implement to react to simple click input.
Refers to general data-agnostic widget functionality
Describes an input event that involves a tap.
virtual void EnableWidget(bool enable)
Turns widget off and on - default behavior hides widget object but exposes root node. Override for custom behaviour