VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
override void AVR.UEditor.UI.AVR_UIInteractionProvider_Editor.OnInspectorGUI ( )
inline

Definition at line 19 of file AVR_UIInteractionProvider_Editor.cs.

20  {
21  base.OnInspectorGUI();
22 
24 
25  if(prov.UIRay==null) {
26  EditorGUILayout.HelpBox("UIInteractionProvider requires a UIRay to work!", MessageType.Warning);
27  if (GUILayout.Button("FIX NOW: Add default UIRay"))
28  {
29  GameObject ray = AVR.UEditor.Core.AVR_EditorUtility.InstantiatePrefabAsChild(prov.transform, "/editor/defaultPrefabPaths/uiRay");
30  prov.UIRay = ray.GetComponent<AVR_UIRay>();
31  }
32  }
33 
34  // There is no EventSystem
35  if(FindObjectOfType<EventSystem>()==null) {
36  EditorGUILayout.HelpBox("UIInteractionProvider requires an EventSystem object to work!", MessageType.Warning);
37  if (GUILayout.Button("FIX NOW: Create EventSystem Object"))
38  {
39  AVR.UEditor.Core.AVR_EditorUtility.InstantiatePrefabAsChild(null, "/editor/defaultPrefabPaths/eventSystem");
40  }
41  }
42  // There is an EventSystem but no VRInput object
43  else if(FindObjectOfType<VRInput>()==null) {
44  EditorGUILayout.HelpBox("UIInteractionProvider requires a VRInput object to work!", MessageType.Warning);
45  EventSystem sys = FindObjectOfType<EventSystem>();
46  if (GUILayout.Button("FIX: Add VRInput Component to "+sys.name))
47  {
48  sys.gameObject.AddComponent<VRInput>();
49  }
50  }
51  }
Represents a UI pointer-ray.
Definition: AVR_UIRay.cs:12
NOTE: If your EventSystem object has a InputSystemUIInputModule (new Unity input system) then any set...
This class overrides the base Input with Input from our VR components, thus enabling UI Interaction w...
Definition: VRInput.cs:14