1
0
mirror of https://github.com/xiaopeng12138/MaiDXR.git synced 2024-12-18 11:55:52 +01:00
MaiDXR/Assets/uWindowCapture/Editor/UwcManagerEditor.cs

41 lines
901 B
C#
Raw Normal View History

2022-01-05 19:44:30 +01:00
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);
}
}
}