summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
authorsmix8 <52464204+smix8@users.noreply.github.com>2022-04-30 13:27:30 +0200
committersmix8 <52464204+smix8@users.noreply.github.com>2022-04-30 13:27:30 +0200
commit05d06b89579a2f39677dcaf7c94432e4c550dea5 (patch)
treecdc687589dc27f4b62476615cdee62e7ac39981a /scene/3d
parentd9b4ab3797fe41e2e6966e69cd342c65c674ce03 (diff)
Add get_region_rid() NavigationRegion2D and NavigationRegion3D
Add get_region_rid() to NavigationRegion2D and NavigationRegion3D
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/navigation_region_3d.cpp6
-rw-r--r--scene/3d/navigation_region_3d.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/scene/3d/navigation_region_3d.cpp b/scene/3d/navigation_region_3d.cpp
index 215e18869a..7f6ecbebb7 100644
--- a/scene/3d/navigation_region_3d.cpp
+++ b/scene/3d/navigation_region_3d.cpp
@@ -73,6 +73,10 @@ uint32_t NavigationRegion3D::get_layers() const {
return NavigationServer3D::get_singleton()->region_get_layers(region);
}
+RID NavigationRegion3D::get_region_rid() const {
+ return region;
+}
+
/////////////////////////////
void NavigationRegion3D::_notification(int p_what) {
@@ -198,6 +202,8 @@ void NavigationRegion3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_layers", "layers"), &NavigationRegion3D::set_layers);
ClassDB::bind_method(D_METHOD("get_layers"), &NavigationRegion3D::get_layers);
+ ClassDB::bind_method(D_METHOD("get_region_rid"), &NavigationRegion3D::get_region_rid);
+
ClassDB::bind_method(D_METHOD("bake_navigation_mesh"), &NavigationRegion3D::bake_navigation_mesh);
ClassDB::bind_method(D_METHOD("_bake_finished", "nav_mesh"), &NavigationRegion3D::_bake_finished);
diff --git a/scene/3d/navigation_region_3d.h b/scene/3d/navigation_region_3d.h
index 1a50bb5f64..1c559bc31a 100644
--- a/scene/3d/navigation_region_3d.h
+++ b/scene/3d/navigation_region_3d.h
@@ -57,6 +57,8 @@ public:
void set_layers(uint32_t p_layers);
uint32_t get_layers() const;
+ RID get_region_rid() const;
+
void set_navigation_mesh(const Ref<NavigationMesh> &p_navmesh);
Ref<NavigationMesh> get_navigation_mesh() const;