Exemplo n.º 1
0
 static AssetDeleteResult OnWillDeleteAsset(string assetName, RemoveAssetOptions removeAssetOptions)
 {
     if (ProjectCuratorData.IsUpToDate)
     {
         ProjectCurator.RemoveAssetFromDatabase(assetName);
         ProjectCurator.SaveDatabase();
     }
     return(AssetDeleteResult.DidNotDelete);
 }
Exemplo n.º 2
0
 static void OnWillCreateAsset(string assetName)
 {
     if (ProjectCuratorData.IsUpToDate)
     {
         Actions.Enqueue(() => {
             ProjectCurator.AddAssetToDatabase(assetName);
             ProjectCurator.SaveDatabase();
         });
     }
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }