Update all get_configuration_warning to retrieve warnings from the parent
This commit is contained in:
parent
00949f0c5f
commit
9fc2b0fddc
40 changed files with 284 additions and 114 deletions
|
|
@ -270,11 +270,16 @@ void NavigationAgent2D::_avoidance_done(Vector3 p_new_velocity) {
|
|||
}
|
||||
|
||||
String NavigationAgent2D::get_configuration_warning() const {
|
||||
String warning = Node::get_configuration_warning();
|
||||
|
||||
if (!Object::cast_to<Node2D>(get_parent())) {
|
||||
return TTR("The NavigationAgent2D can be used only under a Node2D node");
|
||||
if (!warning.empty()) {
|
||||
warning += "\n\n";
|
||||
}
|
||||
warning += TTR("The NavigationAgent2D can be used only under a Node2D node");
|
||||
}
|
||||
|
||||
return String();
|
||||
return warning;
|
||||
}
|
||||
|
||||
void NavigationAgent2D::update_navigation() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue