Merge pull request #105765 from smix8/navlink_iteration_id
Add function to get navigation link iteration id from NavigationServer
This commit is contained in:
@ -102,6 +102,7 @@ void NavigationServer2D::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("region_get_bounds", "region"), &NavigationServer2D::region_get_bounds);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("link_create"), &NavigationServer2D::link_create);
|
||||
ClassDB::bind_method(D_METHOD("link_get_iteration_id", "link"), &NavigationServer2D::link_get_iteration_id);
|
||||
ClassDB::bind_method(D_METHOD("link_set_map", "link", "map"), &NavigationServer2D::link_set_map);
|
||||
ClassDB::bind_method(D_METHOD("link_get_map", "link"), &NavigationServer2D::link_get_map);
|
||||
ClassDB::bind_method(D_METHOD("link_set_enabled", "link", "enabled"), &NavigationServer2D::link_set_enabled);
|
||||
|
||||
@ -161,6 +161,7 @@ public:
|
||||
|
||||
/// Creates a new link between positions in the nav map.
|
||||
virtual RID link_create() = 0;
|
||||
virtual uint32_t link_get_iteration_id(RID p_link) const = 0;
|
||||
|
||||
/// Set the map of this link.
|
||||
virtual void link_set_map(RID p_link, RID p_map) = 0;
|
||||
|
||||
@ -90,6 +90,7 @@ public:
|
||||
Rect2 region_get_bounds(RID p_region) const override { return Rect2(); }
|
||||
|
||||
RID link_create() override { return RID(); }
|
||||
uint32_t link_get_iteration_id(RID p_link) const override { return 0; }
|
||||
void link_set_map(RID p_link, RID p_map) override {}
|
||||
RID link_get_map(RID p_link) const override { return RID(); }
|
||||
void link_set_enabled(RID p_link, bool p_enabled) override {}
|
||||
|
||||
@ -115,6 +115,7 @@ void NavigationServer3D::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("region_get_bounds", "region"), &NavigationServer3D::region_get_bounds);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("link_create"), &NavigationServer3D::link_create);
|
||||
ClassDB::bind_method(D_METHOD("link_get_iteration_id", "link"), &NavigationServer3D::link_get_iteration_id);
|
||||
ClassDB::bind_method(D_METHOD("link_set_map", "link", "map"), &NavigationServer3D::link_set_map);
|
||||
ClassDB::bind_method(D_METHOD("link_get_map", "link"), &NavigationServer3D::link_get_map);
|
||||
ClassDB::bind_method(D_METHOD("link_set_enabled", "link", "enabled"), &NavigationServer3D::link_set_enabled);
|
||||
|
||||
@ -185,6 +185,7 @@ public:
|
||||
|
||||
/// Creates a new link between positions in the nav map.
|
||||
virtual RID link_create() = 0;
|
||||
virtual uint32_t link_get_iteration_id(RID p_link) const = 0;
|
||||
|
||||
/// Set the map of this link.
|
||||
virtual void link_set_map(RID p_link, RID p_map) = 0;
|
||||
|
||||
@ -102,6 +102,7 @@ public:
|
||||
AABB region_get_bounds(RID p_region) const override { return AABB(); }
|
||||
|
||||
RID link_create() override { return RID(); }
|
||||
uint32_t link_get_iteration_id(RID p_link) const override { return 0; }
|
||||
void link_set_map(RID p_link, RID p_map) override {}
|
||||
RID link_get_map(RID p_link) const override { return RID(); }
|
||||
void link_set_enabled(RID p_link, bool p_enabled) override {}
|
||||
|
||||
Reference in New Issue
Block a user