整合SLSUtilities

This commit is contained in:
SoulliesOfficial
2026-01-17 11:35:49 -05:00
parent d94241f36c
commit 7ee2894a63
1338 changed files with 3051541 additions and 507034 deletions

View File

@@ -0,0 +1,49 @@
using System;
using System.Linq;
using UnityEditor;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.Video;
using Object = UnityEngine.Object;
namespace LunaWolfStudiosEditor.ScriptableSheets.Samples.ComponentExplorer
{
public class ComponentExplorerGenerator
{
[MenuItem("Assets/Create/Scriptable Sheets/Component Explorer")]
private static void CreatePrefabWithUnityEngineComponents()
{
var unityEngineTypes = AppDomain.CurrentDomain.GetAssemblies().Where(a => a.GetName().Name.StartsWith("UnityEngine")).SelectMany(a => a.GetTypes())
.Where(t => typeof(Component).IsAssignableFrom(t)
&& !t.IsAbstract
&& t != typeof(Cloth)
&& t != typeof(NavMeshObstacle)
&& t != typeof(SkinnedMeshRenderer)
&& t != typeof(Transform)
&& t != typeof(VideoPlayer)
&& !typeof(MonoBehaviour).IsAssignableFrom(t)
&& !t.Name.Contains("NetworkView")
&& t.GetConstructor(Type.EmptyTypes) != null).ToArray();
var obj = new GameObject("ComponentExplorer");
foreach (var type in unityEngineTypes)
{
try
{
obj.AddComponent(type);
}
catch (Exception ex)
{
Debug.LogWarning($"Could not add {type.Name}\n{ex.Message}.");
}
}
PrefabUtility.SaveAsPrefabAsset(obj, "Assets/ComponentExplorer.prefab");
Object.DestroyImmediate(obj);
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 2d8ed528dc8db884a8503c466eff1e57
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 284559
packageName: Scriptable Sheets
packageVersion: 1.8.0
assetPath: Packages/com.lunawolfstudios.scriptablesheets/Samples~/ComponentExplorer/Editor/ComponentExplorerGenerator.cs
uploadId: 823456

View File

@@ -0,0 +1,16 @@
{
"name": "LunaWolfStudiosEditor.ScriptableSheets.Samples.ComponentExplorer",
"rootNamespace": "LunaWolfStudiosEditor.ScriptableSheets.Samples.ComponentExplorer",
"references": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 6bac9ecbc7f4f2445839b086bf9041de
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 284559
packageName: Scriptable Sheets
packageVersion: 1.8.0
assetPath: Packages/com.lunawolfstudios.scriptablesheets/Samples~/ComponentExplorer/Editor/LunaWolfStudiosEditor.ScriptableSheets.Samples.ComponentExplorer.asmdef
uploadId: 823456