Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by GuitarKirby · Mar 16, 2016 at 12:38 PM · performance optimization

Performance: Update vs Animation

Hey Guys, In terms of performance, what is taking fewer resources for a constant rotation of many similar objects? Should i use a script with an Update function: transform.Rotate (new Vector3(0,0,Time.deltaTime*rotationSpeed)); Or just use an animation for the objects.

Thank you very much.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Brocccoli · Mar 16, 2016 at 05:46 PM

This depends on the functionality of whatever you want to spin.

Does the spinning interact with other things in the world. Is it pertinent that other objects in the world know the rotation of the object that you're spinning at every point in time? Or is it just an aesthetic for the ending of a level, or the death of a character?

You need to decide if the fact that the object is spinning is important to other objects in the world or not. The former would call for an Update method for rotation while the latter would call for an animation.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image GuitarKirby · Mar 17, 2016 at 12:02 AM 1
Share

I will use the animation then. Thank you very much.

avatar image Brocccoli GuitarKirby · Mar 18, 2016 at 01:21 AM 0
Share

@Guitar$$anonymous$$irby you're very welcome

avatar image
2

Answer by vipinsoni38 · Sep 13, 2020 at 06:45 AM

i would say go with Update function because I compared both of these methods by applying on 500 coins and noting fps and Update won this

As you can see below is for the Animation (With Animator component) (32.9 FPS)

alt text

and this one is with a script attached to all 500 coins individually (67 FPS)

alt text


currentfps2.jpg (38.7 kB)
currentfps.jpg (38.0 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by SeasiaInfotechind · Mar 17, 2016 at 12:54 PM

Animation is best and uses less CPU or GPU load. If you simply want to rotate only use animation.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Neogene · Apr 02, 2021 at 05:41 AM

Another solution is to animate using shader this will move the whole pay load to the gpu

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

What is TA Load in the Android internal profiler? 0 Answers

performance when scaling/duplicating objects 0 Answers

Multithreading doesn’t improve performance 0 Answers

Rendering Transparent Geometry Performance Issue 0 Answers

BehaviourUpdate taking unreasonable amounts of resources in the profiler 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges