阶段性完成

This commit is contained in:
SoulliesOfficial
2025-12-08 05:27:53 -05:00
parent ef7b479712
commit f7af60351b
8770 changed files with 15637030 additions and 208354 deletions

View File

@@ -0,0 +1,24 @@
// Copyright (c) Le Loc Tai <leloctai.com> . All rights reserved. Do not redistribute.
using UnityEditor;
using UnityEngine;
namespace LeTai.Common.Editor
{
public static class Assets
{
public static T Find<T>(string assetName, string label = "TranslucentImageEditorResources") where T : Object
{
var guids = AssetDatabase.FindAssets($"l:{label} {assetName}");
if (guids.Length == 0)
{
Debug.LogError($"Asset \"{assetName}\" not found. " +
$"Make sure it have the label \"TranslucentImageEditorResources\"");
return null;
}
var path = AssetDatabase.GUIDToAssetPath(guids[0]);
return AssetDatabase.LoadAssetAtPath<T>(path);
}
}
}