This commit is contained in:
2025-04-14 23:22:38 +02:00
parent 72b8a37345
commit 1e190fe94b
166 changed files with 2989 additions and 687 deletions

View File

@@ -0,0 +1,17 @@
using UnityEditor;
using UnityEngine;
namespace RebootKitEditor.Utils {
public static class AssetDatabaseEx {
public static T[] LoadAllAssets<T>() where T : Object {
string[] guids = AssetDatabase.FindAssets($"t:{typeof(T).Name}");
T[] assets = new T[guids.Length];
for (int i = 0; i < guids.Length; i++) {
string path = AssetDatabase.GUIDToAssetPath(guids[i]);
assets[i] = AssetDatabase.LoadAssetAtPath<T>(path);
}
return assets;
}
}
}