From 5769b0e8d8db75ff500c979aa63d3f3428de526d Mon Sep 17 00:00:00 2001 From: Josh Jones Date: Fri, 30 Sep 2022 23:49:39 -0600 Subject: 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. --- scene/2d/navigation_link_2d.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scene/2d/navigation_link_2d.cpp') 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); } -- cgit v1.2.3