Merge pull request #52759 from Calinou/3d-editor-gizmo-no-name-warning

This commit is contained in:
Rémi Verschelde 2021-09-17 09:30:08 +02:00 committed by GitHub
commit 44b1143f7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1003,7 +1003,9 @@ String EditorNode3DGizmoPlugin::get_gizmo_name() const {
if (get_script_instance() && get_script_instance()->has_method("_get_gizmo_name")) {
return get_script_instance()->call("_get_gizmo_name");
}
return TTR("Nameless gizmo");
WARN_PRINT_ONCE("A 3D editor gizmo has no name defined (it will appear as \"Unnamed Gizmo\" in the \"View > Gizmos\" menu). To resolve this, override the `_get_gizmo_name()` function to return a String in the script that extends EditorNode3DGizmoPlugin.");
return TTR("Unnamed Gizmo");
}
int EditorNode3DGizmoPlugin::get_priority() const {