- Home /
Question by
Jammer3000 · Feb 26, 2014 at 01:50 AM ·
animatorsprites
How to disable an Animator component?
I have an Animator component and it seems to be conflicting with a script I have which adds a force to a sprite? I don't need the animator active after the player clicks on the screen but I can't figure out a way to deactivate the Animator on my GameObject? Now I know how to do it with an Animation component but those don't work with sprites. thanks in advance!
Comment
Answer by Olgo · Feb 26, 2014 at 02:07 AM
Would this not work?
Animator a = GetComponent<Animator>().enabled = false;
Can I put that in an if statement? cause when I try I get tons of errors.
Your answer
Follow this Question
Related Questions
Where can I start to learn more about coding? 2 Answers
How to run an animation clip on button down-hold? 1 Answer
Semicolons are seen as an unexpected symbol 1 Answer
How to scroll a sprite? 0 Answers
Can't get this code to work 0 Answers