// TODO: TBD: does this "context" need to be more formalized, a "search agent", etc? private bool TryResolveContext(ResolutionCallback callback) { var e = EventArgs.Empty; OnResolving(e); var solved = callback(); if (solved) { OnSolved(e); } OnResolved(e); return(solved); }
internal override bool InitialCustomValidations() { AbstractPluginManager pluginManager = GameObject.FindObjectOfType <Agent_HerdSim_PluginManager>(); bool result = base.InitialCustomValidations(); if (UnityEngine.Terrain.activeTerrain.gameObject.layer == LayerMask.NameToLayer(terrainLayerName)) { AddOrUpdateAsPass("Terrain Layer", pluginManager, "The terrain is marked as having the layer `Ground`."); result &= true; } else { ResolutionCallback callback = new ResolutionCallback(SetTerrainLayer, "Set Terrain Layer"); AddOrUpdateAsError("Terrain Layer", pluginManager, "The terrain must be marked as having the layer `Ground`.", callback); result = false; } return(result); }
internal override bool InitialCustomValidations() { AbstractPluginManager pluginManager = GameObject.FindObjectOfType <DigitalPaintingManager>(); bool isPass = base.InitialCustomValidations(); string path = GetPathToScene(); if (AssetDatabase.IsValidFolder(path + "/" + AssetDatabaseUtility.dataFolderName)) { AddOrUpdateAsPass("Data Directory Existence", pluginManager, "The Digital Painting Data exists."); } else { ResolutionCallback callback = new ResolutionCallback(new ProfileCallback(CreateDefaultSettingsData)); AddOrUpdateAsWarning("Data Directory Existence", pluginManager, "The Digital Painting Data folder does not exist.", callback); return(false); } return(isPass); }