1
0
mirror of synced 2024-12-01 01:07:19 +01:00
WACVR/Assets/uWindowCapture/Editor/UwcManagerEditor.cs
2022-05-16 23:38:40 +02:00

41 lines
901 B
C#

using UnityEngine;
using UnityEditor;
namespace uWindowCapture
{
[CustomEditor(typeof(UwcManager))]
public class UwcManagerEditor : Editor
{
UwcManager manager
{
get { return target as UwcManager; }
}
SerializedProperty windowTitlesUpdateTiming;
void OnEnable()
{
windowTitlesUpdateTiming = serializedObject.FindProperty("windowTitlesUpdateTiming");
}
public override void OnInspectorGUI()
{
serializedObject.Update();
Draw();
serializedObject.ApplyModifiedProperties();
}
void Draw()
{
var debugMode = (DebugMode)EditorGUILayout.EnumPopup("Debug Mode", manager.debugModeFromInspector);
if (debugMode != manager.debugModeFromInspector)
{
manager.debugModeFromInspector = debugMode;
}
EditorGUILayout.PropertyField(windowTitlesUpdateTiming);
}
}
}