diff options
author | Josh Jones <kilauea.jones@gmail.com> | 2022-09-30 23:49:39 -0600 |
---|---|---|
committer | Josh Jones <kilauea.jones@gmail.com> | 2022-12-10 12:03:06 -0800 |
commit | 5769b0e8d8db75ff500c979aa63d3f3428de526d (patch) | |
tree | ba0df7ba770e1fa1a9e3fbccd19e0cc781940bd3 /scene/2d/navigation_link_2d.cpp | |
parent | 39fe0bfdc3327d2b1f651739a918daea3ba241f5 (diff) |
Enable assigning an owner to navigation regions and links
This allows users of the server APIs to get back the nodes that created certain regions and links.
Diffstat (limited to 'scene/2d/navigation_link_2d.cpp')
-rw-r--r-- | scene/2d/navigation_link_2d.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/2d/navigation_link_2d.cpp b/scene/2d/navigation_link_2d.cpp index 3f7e10eaea..d639e1cc89 100644 --- a/scene/2d/navigation_link_2d.cpp +++ b/scene/2d/navigation_link_2d.cpp @@ -279,6 +279,8 @@ PackedStringArray NavigationLink2D::get_configuration_warnings() const { NavigationLink2D::NavigationLink2D() { link = NavigationServer2D::get_singleton()->link_create(); + NavigationServer2D::get_singleton()->link_set_owner_id(link, get_instance_id()); + set_notify_transform(true); } |