Browse Source

Merge pull request #62350 from Valeryn4/fix_animation_state_machine

Validate AnimationNode name in AnimationStateMachine
Rémi Verschelde 3 years ago
parent
commit
7281f0f238
1 changed files with 1 additions and 1 deletions
  1. 1 1
      editor/plugins/animation_state_machine_editor.cpp

+ 1 - 1
editor/plugins/animation_state_machine_editor.cpp

@@ -1018,7 +1018,7 @@ void AnimationNodeStateMachineEditor::_add_animation_type(int p_index) {
 
 	anim->set_animation(animations_to_add[p_index]);
 
-	String base_name = animations_to_add[p_index];
+	String base_name = animations_to_add[p_index].validate_node_name();
 	int base = 1;
 	String name = base_name;
 	while (state_machine->has_node(name)) {