VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
AVR_Grabbable_Editor.cs
1 using System.Collections;
2 using System.Collections.Generic;
3 using UnityEngine;
4 using UnityEditor;
5 
6 using AVR.Phys;
7 
8 namespace AVR.UEditor.Phys
9 {
10  [CustomEditor(typeof(AVR_Grabbable), true)]
11  [CanEditMultipleObjects]
12  public class AVR_Grabbable_Editor : AVR.UEditor.Core.AVR_Component_Editor
13  {
14  public override void OnInspectorGUI()
15  {
16  base.OnInspectorGUI();
17 
18  if(GUILayout.Button("Add GrabNode")) {
19  Transform t = AVR.Core.Utils.Misc.CreateEmptyGameObject("GrabNode", ((MonoBehaviour)target).transform);
20  t.gameObject.AddComponent<AVR_GrabNode>();
21  }
22  }
23  }
24 }
25 
Represents a grabbable object.
Represents a grabbable node on an AVR_Grabbable. Nodes have preset poses/constraints for the hand tha...
Definition: AVR_GrabNode.cs:15