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
3
Question by NikEy · Jul 09, 2013 at 12:36 AM · gameobjectperformance

Performance overhead for empty game objects

Hi,

Does anyone have an idea on the overhead for empty game objects? Most of the "limits" that people mention in the forums here apply to objects that are rendered, but are there applicable limits for empty game objects, be it absolute, or limited by performance? Asa practical example: Would I run into problems with 1MM empty game objects in parallel?

Thanks!

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

1 Reply

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

Answer by robertbu · Jul 09, 2013 at 05:01 AM

Anytime I have questions like this one, I just write a quick script and run a test. Here is my script:

 #pragma strict
 
 var objectsPerFrame = 100;
 var guitext : GUIText;
 
 private var created = 0;
 private var time = 0.0;
 private var paused = false;
 
 function Update() {
     if (Input.GetKeyDown(KeyCode.A))
         paused = !paused;
         
        if (paused) return;
 
     time = Time.time;
     for (var i = 0; i < objectsPerFrame; i++) {
         created++;
         var go = new GameObject();
         go.transform.parent = transform;
     }
     guitext.text = time.ToString("N") + " , " + created;
 }

I ran the test on a Windows build on a fairly fast machine with 32 GB of memory. The number of game object made no difference in the frame rate. The app crash at 8.4 million game objects. The frame rate just before the crash was 60 fps...the same as when the app was started. Note the behavior of this script in the editor was substantially different than the standalone app.

Comment
Add comment · Show 3 · 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 NikEy · Jul 09, 2013 at 02:34 PM 1
Share

Hey, this is great, thanks! Would you $$anonymous$$d elaborating on the specific differences you found regarding editor vs standalone?

avatar image robertbu · Jul 10, 2013 at 01:29 AM 2
Share

In the editor the frame rate dropped quickly, likely due to having to update the Hierarchy View. It took a long time to just get 100,000 object. Note when I paused in the editor view, the frame rate jumped back to normal.

avatar image NikEy · Jul 10, 2013 at 02:45 AM 1
Share

$$anonymous$$uch appreciated. thanks

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

15 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

Related Questions

Does inactive Objects eat up Performance? 1 Answer

How can I defer the recalculation of child transforms whilst modifying the parent transform? 0 Answers

large number of identical objects in scene? 3 Answers

Replace GameObject vs. replacing mesh and material? 2 Answers

What's a cheaper reference, GameObject or 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