Allow to compile templates without navigation features

This commit is contained in:
Michael Alexsander 2025-03-30 13:20:04 -03:00
parent d52b84e472
commit 556933306a
No known key found for this signature in database
GPG key ID: A9C91EE110F4EABA
79 changed files with 665 additions and 220 deletions

View file

@ -30,13 +30,14 @@
#include "mesh_instance_2d.h"
#ifndef NAVIGATION_2D_DISABLED
#include "scene/resources/2d/navigation_mesh_source_geometry_data_2d.h"
#include "scene/resources/2d/navigation_polygon.h"
#include "scene/scene_string_names.h"
#include "servers/navigation_server_2d.h"
#include "thirdparty/clipper2/include/clipper2/clipper.h"
#include "thirdparty/misc/polypartition.h"
#endif // NAVIGATION_2D_DISABLED
Callable MeshInstance2D::_navmesh_source_geometry_parsing_callback;
RID MeshInstance2D::_navmesh_source_geometry_parser;
@ -117,6 +118,7 @@ bool MeshInstance2D::_edit_use_rect() const {
}
#endif // DEBUG_ENABLED
#ifndef NAVIGATION_2D_DISABLED
void MeshInstance2D::navmesh_parse_init() {
ERR_FAIL_NULL(NavigationServer2D::get_singleton());
if (!_navmesh_source_geometry_parser.is_valid()) {
@ -211,6 +213,7 @@ void MeshInstance2D::navmesh_parse_source_geometry(const Ref<NavigationPolygon>
p_source_geometry_data->add_obstruction_outline(shape_outline);
}
}
#endif // NAVIGATION_2D_DISABLED
MeshInstance2D::MeshInstance2D() {
}