예제 #1
0
 static AssetDeleteResult OnWillDeleteAsset(string assetName, RemoveAssetOptions removeAssetOptions)
 {
     if (ProjectCuratorData.IsUpToDate)
     {
         ProjectCurator.RemoveAssetFromDatabase(assetName);
         ProjectCurator.SaveDatabase();
     }
     return(AssetDeleteResult.DidNotDelete);
 }
예제 #2
0
 static void OnWillCreateAsset(string assetName)
 {
     if (ProjectCuratorData.IsUpToDate)
     {
         Actions.Enqueue(() => {
             ProjectCurator.AddAssetToDatabase(assetName);
             ProjectCurator.SaveDatabase();
         });
     }
 }
예제 #3
0
 static AssetMoveResult OnWillMoveAsset(string sourcePath, string destinationPath)
 {
     if (ProjectCuratorData.IsUpToDate)
     {
         Actions.Enqueue(() => {
             ProjectCurator.RemoveAssetFromDatabase(sourcePath);
             ProjectCurator.AddAssetToDatabase(destinationPath);
             ProjectCurator.SaveDatabase();
         });
     }
     return(AssetMoveResult.DidNotMove);
 }
예제 #4
0
 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);
 }