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 NPS · Jun 03, 2014 at 08:11 PM · gameobjecthierarchyoverhead

Grouping objects without overhead?

Sometimes it is preferable to group multiple objects (e.g. of the same type) in Hierarchy into one group (so that 100 objects at the top of the Hierarchy don't clutter it). I used to do that by creating an empty GameObject and attaching the objects as its children.

But lately a colleague of mine discovered that even adding an empty object as a parent has significant performance overhead during gameplay. For why is that I have no idea but that's beyond this question's scope.

  1. Is there any way of grouping objects without affecting game's performance?

  2. I've read here: http://answers.unity3d.com/questions/118306/grouping-objects-in-the-hierarchy.html that setting the group-object's position to (0, 0, 0) should help, is it true? Is it treated by Unity differently then?

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 Sisso · Jun 03, 2014 at 08:27 PM 2
Share

It is good to know the answer.

But I have many suspicious about your friend performance test. Remember, if is not a problem in your project, you don't need to solve :P

avatar image NPS · Jun 04, 2014 at 11:40 AM 0
Share

I wrote it does affect performance in my project. Significantly.

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by rutter · Jun 03, 2014 at 08:59 PM

There is some performance overhead associated with hierarchy grouping, but it's not very big unless you're re-parenting hundreds or thousands of GameObjects per frame.

The "empty" parents should generally be at location (0,0,0), with rotation (0,0,0), with scale (1,1,1), to avoid unintuitive positioning issues.

I'm curious what scenario you've seen where this became a significant performance problem. Do you have profiler or other benchmarking data to back that up? Is the issue reproducible?

Comment
Add comment · Show 1 · 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 NPS · Jun 04, 2014 at 11:45 AM 0
Share

Do you know for certain whether default (identity) transform is optimised anyhow in Unity (performance-wise)?

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

24 People are following this question.

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

Related Questions

Using Empty GameObjects to organize hierarchy? 2 Answers

Best workflow for DontDestroyOnLoad method regarding Unity Editor? 1 Answer

Scripts in Hierarchy attached to empty object not showing? 1 Answer

Animations only playing correctly when GameObject is selected in hierarchy,Animations only working when Object is selected in hierarchy. 1 Answer

How do I replace a game object with another one in the hierarchy? 0 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