L
L
LeBrone2021-12-02 01:08:22
Unity
LeBrone, 2021-12-02 01:08:22

How to disable script during animation?

When my character makes an attack, he can move during the animation. How to turn off the script (which is responsible for the movement of the character) during the animation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GFX Data, 2021-12-02
@LeBrone

var script = GetComponent<Script>();
if (script != null) script.enable = false;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question