v4.1.1.stable.official [bd6af8e0e]
I made a simple GDExtension module to increase performance for a key node.
When I change_type of the node in question to the new node type written in c++, the editor crashes with the following error message.
ERROR: Node not found: "NavigationAgent3D" (relative to "/root/@EditorNode@17637/@Control@697/@Panel@698/@VBoxContainer. at: (scene/main/node.cpp:1620)
It seems the _ready func is called from within the editor. The _ready func is this:
void Agent::_ready() {
navigation_agent = get_node<NavigationAgent3D>("NavigationAgent3D");
navigation_agent->set_path_desired_distance(0.5);
navigation_agent->set_target_desired_distance(0.5);
anim_player = get_node<AnimationPlayer>("AnimationPlayer");
anim_player->play("walking");
}
- I don't expect _ready to be called at all until I actually run the project.
- The NavigationAgent3D node is where it's supposed to be, but clearly the engine is looking for the node in a completely different part of the scene tree.
Any ideas?