Forum rules - please read before posting.

Stop Animation through action list

I've tried using Object-->Animate-->Legacy-->Stop Custom. And I can drag my anim clip in there fine and attached an animation component to my object which has the animation controller in it. I've dragged this object to the animation clip box in the action list node. However the animation is not stopping when running the action list.

I am using the animation controller to run the animation in the first place, not the animation component. Is this the reason its not stopping? In which case how could i stop the animation which is being run by the animation controller.

fyi - I am doing this in the interest of saving memory and processing when player no longer sees this animation. Is this required?

Comments

  • try using Object---animate---sprites unity----stop custom

  • "Legacy" refers to Unity's old animation system and it's use is discouraged nowadays.

    Animations inside an Animator Controller cannot be "stopped" in the same way - though you can use animator parameters to control what is played at any one time. Using the Object: Animate Action, with the Animation engine field set to Mecanim, you can control parameter values and hence what animation is played.

    To completely disable an Animator, you need to disable the component itself - which you can do via scripting if necessary.

    Unless you're dealing with many such animations / controllers, however, I shouldn't think the overhead is too large. You can use the Profiler window while manually disabling/enabling the component in the Inspector to see what difference it makes.

  • Ok thanks for that.

    Seems to not canged anything in profiler by disabling the animation.

    On a similar topic, can I disable a partical effect no longer being used? It looks like no change in the Profiler again, does that sound correct?

  • If you attach the "Particle Switch" component, it will react to the Object: Send message Action's "Turn Off" command. See the Manual's "Particle switch" chapter for more.

  • ah cool. cheers.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.