static AssetDeleteResult OnWillDeleteAsset(string assetName, RemoveAssetOptions removeAssetOptions) { if (ProjectCuratorData.IsUpToDate) { ProjectCurator.RemoveAssetFromDatabase(assetName); ProjectCurator.SaveDatabase(); } return(AssetDeleteResult.DidNotDelete); }
static void OnWillCreateAsset(string assetName) { if (ProjectCuratorData.IsUpToDate) { Actions.Enqueue(() => { ProjectCurator.AddAssetToDatabase(assetName); ProjectCurator.SaveDatabase(); }); } }
static AssetMoveResult OnWillMoveAsset(string sourcePath, string destinationPath) { if (ProjectCuratorData.IsUpToDate) { Actions.Enqueue(() => { ProjectCurator.RemoveAssetFromDatabase(sourcePath); ProjectCurator.AddAssetToDatabase(destinationPath); ProjectCurator.SaveDatabase(); }); } return(AssetMoveResult.DidNotMove); }
static string[] OnWillSaveAssets(string[] paths) { if (ProjectCuratorData.IsUpToDate) { Actions.Enqueue(() => { foreach (string path in paths) { ProjectCurator.RemoveAssetFromDatabase(path); ProjectCurator.AddAssetToDatabase(path); } ProjectCurator.SaveDatabase(); }); } return(paths); }