mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
UpdateSetting Editor不限定路径
UpdateSetting Editor不限定路径
This commit is contained in:
@@ -44,7 +44,12 @@ namespace TEngine
|
|||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
if (Instance == null)
|
if (Instance == null)
|
||||||
{
|
{
|
||||||
return UnityEditor.AssetDatabase.LoadAssetAtPath<UpdateSetting>("Assets/TEngine/Settings/UpdateSetting.asset");
|
string[] guids = UnityEditor.AssetDatabase.FindAssets("t:UpdateSetting");
|
||||||
|
if (guids.Length >= 1)
|
||||||
|
{
|
||||||
|
string path = UnityEditor.AssetDatabase.GUIDToAssetPath(guids[0]);
|
||||||
|
return UnityEditor.AssetDatabase.LoadAssetAtPath<UpdateSetting>(path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return Instance.updateSetting;
|
return Instance.updateSetting;
|
||||||
|
Reference in New Issue
Block a user