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
0
Question by Abacab · Feb 20, 2015 at 07:15 AM · c#lagprofiler

How to reduce Draw-Calls?

Hello!

I thought that my new camera was lagging, but it is actually a deeper issue that I've caused myself with some recent changes.

Here is the profiler data. Can someone with more experience spot what could be causing the lag?

 iPhone Unity internal profiler stats:
 cpu-player>    min: 17.0   max: 98.6   avg: 24.8
 cpu-ogles-drv> min:  3.3   max:  4.0   avg:  3.6
 cpu-present>   min:  1.0   max:  4.0   avg:  1.5
 frametime>     min: 24.0   max: 117.2   avg: 38.5
 draw-call #>   min: 125    max: 125    avg: 125     | batched:     0
 tris #>        min: 42664  max: 42664  avg: 42664   | batched:     0
 verts #>       min: 28130  max: 28130  avg: 28130   | batched:     0
 player-detail> physx:  0.6 animation:  0.0 culling  0.0 skinning:  0.0 batching:  0.0 render: 12.4 fixed-update-count: 1 .. 5
 mono-scripts>  update:  1.3   fixedUpdate:  0.6 coroutines:  0.0 
 mono-memory>   used heap: 634880 allocated heap: 1097728  max number of collections: 0 collection total duration:  0.0

How do I reduce draw-calls?

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
1

Answer by hexagonius · Feb 20, 2015 at 04:03 PM

It's the drawcalls you have a problem with. Try getting them down by using as few materials as possible. Try merging textures into atlases.

Comment
Add comment · Show 5 · 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 Abacab · Feb 20, 2015 at 04:05 PM 0
Share

Is there anything else that could be the reason? I don't recall adding any additional materials before the lagging started. :/

avatar image hexagonius · Feb 20, 2015 at 04:41 PM 0
Share

Comparing to the screenshot of the Unity iOS Profiler, besides your overall larger numbers at least I am not seeing anything else. In my experience 125 drawcalls is just way too much. $$anonymous$$aybe some code got more expensive on the CPU causing the stutter now, but bringing the drawcalls down is a task you should definitely address yourself to.

avatar image Abacab · Feb 20, 2015 at 04:55 PM 0
Share

I'll get right on it. Thanks for your answer!

I'll comment here if it doesn't solve the lag.

avatar image Abacab · Feb 20, 2015 at 05:08 PM 0
Share

By the way, the lag instantly stops when I cross the finishline.

avatar image Abacab · Feb 20, 2015 at 08:35 PM 0
Share

alt text

I checked the "static" checkbox in the inspector for the cubes, asphalt and directional lights. Still over 100 draw calls. Do you know why there are so many? Canvas? Should I check the "static"-box on each Canvas object?

screen-shot-2015-02-20-at-223405.png (18.4 kB)

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

21 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

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

Optimizing script to improve lag 1 Answer

Initialising List array for use in a custom Editor 1 Answer

Is the C# Profiler class available for the Personal edition of Unity? 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