summaryrefslogtreecommitdiff
path: root/WorldlineKeepers/Assets/Scripts/Managers
diff options
context:
space:
mode:
authorchai <215380520@qq.com>2023-06-30 19:20:16 +0800
committerchai <215380520@qq.com>2023-06-30 19:20:16 +0800
commit7de061b5595c3b849c3e010ed7c7deed9ce7a1ff (patch)
treebe6305a7db6645b865ecc3073ff121222ae4241b /WorldlineKeepers/Assets/Scripts/Managers
parent6dbca86d957f774059068b8dbe01170d71cb0e8f (diff)
Diffstat (limited to 'WorldlineKeepers/Assets/Scripts/Managers')
-rw-r--r--WorldlineKeepers/Assets/Scripts/Managers/ResourceManager.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/WorldlineKeepers/Assets/Scripts/Managers/ResourceManager.cs b/WorldlineKeepers/Assets/Scripts/Managers/ResourceManager.cs
index 0fd18df..4f63517 100644
--- a/WorldlineKeepers/Assets/Scripts/Managers/ResourceManager.cs
+++ b/WorldlineKeepers/Assets/Scripts/Managers/ResourceManager.cs
@@ -28,6 +28,17 @@ namespace WK
#endif
}
+ public T LoadAssetFullPath<T>(string fullPath) where T : UnityEngine.Object
+ {
+#if UNITY_EDITOR
+ string path = fullPath;
+ T obj = AssetDatabase.LoadAssetAtPath(path, typeof(T)) as T;
+ return obj;
+#else
+ return null ;
+#endif
+ }
+
/// <summary>
/// ¸ù¾Ýfilekey¶Á×ÊÔ´
/// </summary>