Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
RanBowJet

Unity Update Mode - Help

Question

Posted (edited)

Hello Armedunity forum, I have one question to the Unity update mode.

 

Question:

 

How can I switch from the animation update mode "Animate Physics" to "normal" and then automatically back to "Animate Physics" again with a UI button click?

 

So via a UI button, switching the animator from "Animate Physics" to "normal" and then automatically back to "Animate Physics" again.

 

From"Animate Physics":

animated_physics.jpg

To "normal"

normal.jpg

and then automatically back to "Animate Physics" again.

 

It would be cool if one can help me with that;)

 

Thanks

 

Edited by RanBowJet

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

By changing animator.updateMode back and forth

 

Please login or register to see this link.

  • Thanks 1

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

The Unity documentation tells you how to change variables in components. For this case you probably need to use the Please login or register to see this link. .

 

So your code should be like this:

Please login or register to see this code.

Then you just need to hook up the OnButtonPressed function to your UI Button Pressed Event.

 

This is very similar to your last question. Maybe it is worth taking some time out to do some programming tutorials?

Edited by randomrabbit
  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×