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
1
Question by Corbeau · Oct 21, 2011 at 07:02 AM · objectperformanceobjectsmodular

Performance Problems - Object Quantity

I've been working with modular ships in a shmup, and am having substantial problems. I can have about ~20 modular ships (via many child objects for each ship) active and on screen, each with ~30 total objects, without performance problems. If I increase the object count to ~40 per ship, without adding any additional scripts at all, I get a slideshow.

Everything points to the pure object count. Nothing is being instantiated at the time, and none of my scripts search through the whole object database. The game uses only ~25% of my available memory during all of this. My GPU barely even notices the load from the simple meshes being used. The additional objects do add more box colliders (about two box colliders per three objects, on average), but no additional rigidbodies nor any additional scripts. Collision detection on each rigidbody is set to discrete. The game runs at 120 fps (including physics) and is smooth as butter otherwise.

What can I do to improve the situation, or at least get a better idea of what is going wrong?

Thanks,

Comment
Add comment · Show 9
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 kromenak · Oct 21, 2011 at 07:28 AM 0
Share

How do your draw calls look? If you have Unity Pro, you can run the profiler to see what's up as well.

avatar image Corbeau · Oct 21, 2011 at 07:45 AM 0
Share

Unfortunately, I don't have Pro and don't have the logistics in position to purchase it. Believe me, I wish that I did!

avatar image Graham-Dunnett ♦♦ · Oct 21, 2011 at 01:09 PM 0
Share

In the Game view press the Stats button. Then take a screenshot of that and post it back into your question so we can see some numbers. Also, do you get any errors or warnings in the log? Sometimes when things go badly wrong the framerate can drop because your game is causing so many errors/warnings that time is burnt writing these to a log.

avatar image kromenak · Oct 21, 2011 at 09:09 PM 1
Share

Your stats look excellent to me, except for obviously the 184.3ms frame time. It would appear that there is something in your code that is eating up a lot of time.

If you know for sure that is not the case, then possibly the problem is related to Device.present and the order in which graphics are updating/code is updating. Check out this link http://forum.unity3d.com/threads/86312-Device.Present-in-profiler....what-the-deal. Unfortunately, the easiest way to check if this is occurring it to see if the Device.Present function is showing up in the profiler. There is a setting mentioned in that thread that you might want to try turning off and see if you have any improvement.

avatar image syclamoth · Oct 22, 2011 at 03:29 AM 1
Share

I'm told that using the 'transform' automatic lookup can have performance penalties, as well- if you're going to be making a lot of calls to an object's transform, thing about keeping a reference to a Transform 'myTrans' which you assign in start, and from then on use that ins$$anonymous$$d of using the automatic lookup.

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Counting active objects in a list 3 Answers

Attach Object to Object?-IS IT POSSIBLE? 1 Answer

Why do my objects keep changing speed? 1 Answer

Return a parent object to different derived objects from a function 2 Answers

PlayerPrefs on gameObject 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