You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/3rd/StompyRobot/SRDebugger/Scripts/Editor/SettingsEditor.cs

50 lines
1.3 KiB
C#

3 months ago
#if !DISABLE_SRDEBUGGER
using UnityEditor;
using UnityEngine;
namespace SRDebugger.Editor
{
[CustomEditor(typeof (Settings))]
class SettingsEditor : UnityEditor.Editor
{
private bool _override;
public override void OnInspectorGUI()
{
SRInternalEditorUtil.DrawLogo(SRInternalEditorUtil.GetLogo());
GUILayout.Label(
"This asset contains the runtime settings used by SRDebugger. It is recommended that this asset be edited only via the SRDebugger Settings window.",
EditorStyles.wordWrappedLabel);
EditorGUILayout.Separator();
if (GUILayout.Button("Open SRDebugger Settings Window"))
{
SRDebuggerSettingsWindow.Open();
}
if (!_override)
{
if (GUILayout.Button("Override Warning"))
{
_override = true;
}
}
else
{
GUILayout.Label(
"You have been warned...",
EditorStyles.wordWrappedLabel);
}
EditorGUILayout.Separator();
if (_override)
{
base.OnInspectorGUI();
}
}
}
}
#endif