mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Allow to compile templates without navigation features
This commit is contained in:
parent
d52b84e472
commit
556933306a
79 changed files with 665 additions and 220 deletions
|
|
@ -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() {
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue