首次提交

This commit is contained in:
Bob.Song
2026-03-05 18:07:55 +08:00
commit e125bb869e
4534 changed files with 563920 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
using UnityEditor;
namespace Ilumisoft.GraphicsControl.Editor
{
[CustomEditor(typeof(GraphicSetting), true)]
public class GraphicSettingEditor : UnityEditor.Editor
{
public override void OnInspectorGUI()
{
serializedObject.Update();
EditorGUI.BeginChangeCheck();
DrawPropertiesExcluding(serializedObject, "m_Script");
if (EditorGUI.EndChangeCheck())
{
serializedObject.ApplyModifiedProperties();
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f87684af450126c44896e4b52fbd408e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
using UnityEditor;
using UnityEngine;
namespace Ilumisoft.GraphicsControl.Editor
{
class GraphicsCotnrolSettingsProvider
{
[SettingsProvider]
public static SettingsProvider CreateStartupProfileConfigurationProvider() => CreateProvider("Project/Graphics Control", Configuration.Find());
static SettingsProvider CreateProvider(string settingsWindowPath, Object asset)
{
var provider = AssetSettingsProvider.CreateProviderFromObject(settingsWindowPath, asset);
provider.keywords = SettingsProvider.GetSearchKeywordsFromSerializedObject(new SerializedObject(asset));
return provider;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7039f079b3dfc6b45b850a93d88857a9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,18 @@
{
"name": "Ilumisoft.GraphicsControl.Editor",
"rootNamespace": "",
"references": [
"GUID:7f595fd175e67274183d17fac15b74c9"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e85b0f2ab2cb4fd4396d9ce383d836d9
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
using UnityEditor;
using UnityEngine;
namespace Ilumisoft.GraphicsControl.Editor
{
public static class MenuItems
{
// Add a menu item to create custom GameObjects.
// Priority 1 ensures it is grouped with the other menu items of the same kind
// and propagated to the hierarchy dropdown and hierarchy context menus.
[MenuItem("GameObject/UI/Graphic Settings Panel", false, 10)]
static void CreateCustomGameObject(MenuCommand menuCommand)
{
Configuration configuration = Configuration.Find();
if(configuration.GraphicSettingsPanel == null)
{
Debug.LogWarning("Could not create Graphic Settings Panel, because no prefab has been assigned in the project settings.");
return;
}
// Create a custom game object
GameObject go = PrefabUtility.InstantiatePrefab(configuration.GraphicSettingsPanel) as GameObject;// new GameObject("Graphic Settings Panel");
go.name = "Graphic Settings Panel";
// Ensure it gets reparented if this was a context click (otherwise does nothing)
GameObjectUtility.SetParentAndAlign(go, menuCommand.context as GameObject);
// Register the creation in the undo system
Undo.RegisterCreatedObjectUndo(go, "Create " + go.name);
Selection.activeObject = go;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a00eef7e69de0bd46a508e735bcde211
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: