Merge pull request #36470 from SkyLucilfer/3.2

Add abort mechanism when invoking EditorNavigationMeshGenerator::bake…
This commit is contained in:
Rémi Verschelde 2020-02-23 09:13:47 +01:00 committed by GitHub
commit f4e3701893
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -433,6 +433,11 @@ EditorNavigationMeshGenerator::~EditorNavigationMeshGenerator() {
void EditorNavigationMeshGenerator::bake(Ref<NavigationMesh> p_nav_mesh, Node *p_node) {
if (!Engine::get_singleton()->is_editor_hint()) {
ERR_PRINTS("Invoking EditorNavigationMeshGenerator::bake(...) in-game is not supported in Godot 3.2 or below. Aborting bake...");
return;
}
ERR_FAIL_COND(!p_nav_mesh.is_valid());
EditorProgress ep("bake", TTR("Navigation Mesh Generator Setup:"), 11);