Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
2
Question by terablargh · May 15, 2011 at 05:09 PM · transformoptimizationchildren

Does moving around lots of unused naked tranforms consume cpu cycles?

If I have an object with a bunch of empty gameobjects with just Transform components as its children, but nothing attached to those- and the parent object is moving and rotating, is the engine keeping track of the position and rotation of each one of those points every frame, or are they only being recalculated relative to the parent when a script addresses one of them and ignored the rest of the time?

Comment
Add comment · Show 2
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 Owen-Reynolds · May 15, 2011 at 09:50 PM 0
Share

Either is doable, and no good way to know w/o a stopwatch. $$anonymous$$y guess, child world transforms are computed "as needed," each time you look them up.

avatar image terablargh · May 16, 2011 at 04:19 PM 1
Share

I was worried about this late at night and thought I might have to redo something but really if I thought of this way to optimize the engine surely the pantheon of coders at Unity3D did too. I also was looking at switch-case statements and wonder if it matters to put the most likely chosen cases first or make them branching ins$$anonymous$$d of a long list one deep, but I think ultimately none of that stuff matters to framerate compared to adding one more light to the scene.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Paulius-Liekis · May 25, 2011 at 09:24 AM

World positions of child transforms are updated on demand, so if you're not accessing them and there are no Renderers/Physics/And other stuff on it then world matrices shouldn't be calculated.

On the other hand if you have lots and lots of them they might consume some performance, because Unity has to allocate memory for them and do some basic managment.

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

1 Person is following this question.

avatar image

Related Questions

Pre-Emptive Optimisation Help 0 Answers

Getting screenshots within a loop? 2 Answers

transform.localScale very slow on device (contrary to Android Remote) 2 Answers

Is there any way to use parenting as an organization tool without creating a Transform bond? 3 Answers

Return array of transform 2 Answers


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