forked from needle-mirror/com.unity.xr.management
-
Notifications
You must be signed in to change notification settings - Fork 1
/
XRManagerEditor.cs
35 lines (27 loc) · 924 Bytes
/
XRManagerEditor.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using UnityEngine.XR.Management;
namespace UnityEditor.XR.Management
{
[CustomEditor(typeof(XRManagerSettings))]
internal class XRManagerSettingsEditor : Editor
{
XRLoaderOrderUI m_LoaderUi = new XRLoaderOrderUI();
internal BuildTargetGroup BuildTarget
{
get;
set;
}
public void Reload()
{
m_LoaderUi.CurrentBuildTargetGroup = BuildTargetGroup.Unknown;
}
/// <summary><see href="https://docs.unity3d.com/ScriptReference/Editor.OnInspectorGUI.html">Editor Documentation</see></summary>
public override void OnInspectorGUI()
{
if (serializedObject == null || serializedObject.targetObject == null)
return;
serializedObject.Update();
m_LoaderUi.OnGUI(BuildTarget);
serializedObject.ApplyModifiedProperties();
}
}
}