BITFALL/Assets/Polaris - Low Poly Ecosystem/Polaris - Low Poly Terrain .../Editor/Scripts/SettingsProviders/GRuntimeSettingsProvider.cs

36 lines
1022 B
C#
Raw Normal View History

2025-03-14 21:04:19 +08:00
#if GRIFFIN
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
namespace Pinwheel.Griffin
{
public class GRuntimeSettingsProvider : SettingsProvider
{
public GRuntimeSettingsProvider(string path, SettingsScope scope = SettingsScope.Project) : base(path, scope)
{
}
public override void OnGUI(string searchContext)
{
base.OnGUI(searchContext);
float labelWidth = EditorGUIUtility.labelWidth;
EditorGUIUtility.labelWidth = 250;
Editor editor = Editor.CreateEditor(GRuntimeSettings.Instance);
editor.OnInspectorGUI();
EditorGUIUtility.labelWidth = labelWidth;
}
[SettingsProvider]
public static SettingsProvider CreateSettingsProvider()
{
GRuntimeSettingsProvider provider = new GRuntimeSettingsProvider("Project/Polaris/Runtime", SettingsScope.Project);
return provider;
}
}
}
#endif