Godot Version
4.3 stable
Question
I am trying to connect to NavigationServer3D’s map_changed signal.
(NavigationServer3D — Godot Engine (stable) documentation in English)
but I get an error “Signal is nonexistent” (while I managed to connect the on_ready signal through the current method - see code below).
I resorted to using a code connect, since the NavigationServer is not a Node (afaik) and then does not appear in the editor signals list of my test scene.
It probably comes from the fact I should somehow pass the map’s RID (as it is a param mentionned in the linked doc) while connecting, but I can not think of how to do so.
using Godot;
using System;
public partial class ExampleNavigationRegion : NavigationRegion3D
{
private void OnTreeEntered()
{
GD.Print("ExampleNavigationRegion entered Tree");
this.Connect(ExampleNavigationRegion.SignalName.Ready, new Callable(this, MethodName.OnReady));
this.Connect(NavigationServer3D.SignalName.MapChanged, new Callable(this, MethodName.OnMapChanged));
}
private void OnReady()
{
GD.Print("Ready");
}
private void OnBakeFinished()
{
GD.Print("baking finished");
}
private void OnNavigationMeshChanged()
{
GD.Print("Navigation Mesh changed");
}
private void OnMapChanged()
{
GD.Print("Navigation Map changed");
}
}