Validate AnimationNode name in AnimationStateMachine

Fixes #60959.
This commit is contained in:
Valerii 2022-06-22 16:36:52 +10:00 committed by Rémi Verschelde
parent c18d0f2035
commit c28efd6c95

View File

@ -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)) {