Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 Chadista · May 18, 2015 at 10:39 AM · frameratedrawcallsstatscallssetpass

Stats greatly fluctuating. Do not know what is causing it.

So I am currently working on a group project in Unity 5. We are struggling with framerate issues at the moment. When taking a look at the stats they greatly fluctuate very rapidly. Examples of this is setpass calls changing between 80 and 6000, tris changing between 70 000 and 1,7 million and batches changing between 160 and 7500.

Below are two screen caps taken only a second apart (note the changes in the stats window): http://i.imgur.com/rA6wXy2.png and http://i.imgur.com/wQxeeuZ.png

Can someone give some insight into what might be causing this behaviour ?

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Graham-Dunnett · May 18, 2015 at 10:39 AM

Time to learn how to use the profiler in 5.x.

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 Bunny83 · May 18, 2015 at 11:05 AM 0
Share

I'm just a bit stunned... Is the profiler now available for free users as well? o.O At least it seems so. When was that changed? 5.0+?

Anyways that's awesome ^^

avatar image
1

Answer by Bunny83 · May 18, 2015 at 11:00 AM

I suggest you do the following steps:

  • If you have Unity pro, use the profiler to see what's going on.

  • If not follow these steps:

  • Backup your project

  • Run the game in the editor and collapse all gameobjects in the hierarchy.

  • Start deleting the gameobjects one after another

  • See when it stops fluctuation.

  • Restart the game and only delete the object you deleted last

  • If the problem is gone, restart again, expand that object and delete it's childs, one after another.

  • If it wasn't solved by just deleting the last deleted top object, try to find out which top gameobjects has to be deleted together to solve the problem

  • If you get a NullReference exception after deleting an object, it's the best time to insert some null-checks into those scripts ^^.

  • Once you have isolated the problem think about what scripts are attached to those object(s) and it's childs. What do they do / change each frame. What other components are involved? Particlesystems, Rigidbodies, GUI, Renderer

Additionally you might want to press the pause button in the editor and step through your game (the button on the left of the pause button). Do you see any pattern? Switching each frame? About every X frames?

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 Chadista · May 19, 2015 at 10:47 AM 0
Share

Thank you very much! Because this is our first project in unity we are sometimes struggling even with the basics :)

Following your steps helped alot. By looking at what was using alot of resources in the profiler I managed to narrow it down to a realtime reflection probe. After deleting it from the scene the fluctuating stopped.

I also managed to find another problem that seems to be causing framerate issues. An enemy type in our game is a swarm of bats that fly in patterns that the player has to avoid. Each bat has a behaviour, joints and animations and apparently these are still continually calculated constantly even when far out of sight leading to behaviours for possibly thousands of bats (all bats in the level) being processed all the time. A blunder on our side. Since unity has automatic frustum culling i guess we kind of assumed the bats behaviours would also be "culled" in some way.

Do you have a tip on a standard way to take care of this?

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Stats Greatly fluctuating. Do not know what is causing it. 0 Answers

Why so many SetPass Calls? 1 Answer

How my Batches can be so high? Like 40 000 batches. 0 Answers

Frame Rate Problem 1 Answer

Why Frame per second script always show me 60FPS ? 3 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