mirror of
https://github.com/xiaopeng12138/MaiDXR.git
synced 2024-12-18 11:55:52 +01:00
41 lines
901 B
C#
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);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}
|