/// <summary> /// Don't forget the .asset extension /// </summary> public static T LoadOrCreateAsset <T>(string path, Func <T> createFunc) where T : UnityEngine.Object { T asset = AssetDatabase.LoadAssetAtPath <T>(path); if (asset == null) { AssetDatabaseX.CreateFolderFromPath(path.Remove(path.LastIndexOf('/'))); AssetDatabase.CreateAsset(createFunc(), path); asset = AssetDatabase.LoadAssetAtPath <T>(path); } return(asset); }
internal static ScriptDefineSymbolManagerSettings GetOrCreateSettings() { return(AssetDatabaseX.LoadOrCreateScriptableObjectAsset <ScriptDefineSymbolManagerSettings>(ASSET_PATH)); }