AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
TestWidgetEnable.cs
Go to the documentation of this file.
1 using ARDesign.Widgets;
2 using System.Collections;
3 using System.Collections.Generic;
4 using UnityEngine;
5 
6 public class TestWidgetEnable : MonoBehaviour {
7  private bool isEnable = false;
8  private WidgetHandler parent;
9 
10  // Use this for initialization
11  void Start () {
12  parent = this.GetComponentInParent<WidgetHandler>();
13  }
14 
15  void OnMouseDown () {
16  parent.EnableWidget(!isEnable);
17  isEnable = !isEnable;
18  }
19 }
Refers to general data-agnostic widget functionality
virtual void EnableWidget(bool enable)
Turns widget off and on - default behavior hides widget object but exposes root node. Override for custom behaviour