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 HKFiftyOne · Apr 20, 2013 at 08:21 PM · performanceissues

Game Performance

For some reason, Unity all of a sudden just started becoming extremely laggy when in play mode, and I have no idea why, everything works very fast when Im editing things in the scene view, but when I go into play mode, I get around 4 fps. The same thing happens when I build the game and play it (.exe), except when I play the game, it's still laggy, but I get higher fps, around 10-12. However, I have no idea why it would be this slow. To test it, I removed almost all the box colliders, mesh colliders, and animations in the entire game, but still I get 4 fps in play mode within Unity, and 10-12 fps when I play the build. What I don't understand, is that the game ran at about 40 fps before I started having this problem, (which happened litteraly in a matter of minutes. One minute it ran fine, and within a course of around 5 minutes, it became extremely laggy and hasnt gotten any better since) and I had even more resources being used, with all the box colliders and animations and sounds. I've gotten rid of litteraly half of the resource intensive assets in my game, and yet it still runs extremely slow.

Any ideas? I'd really like to get this problem resolved. It would be horrible to have spent so much time on a game just to have it be entirely unplayable.

Comment
Add comment · Show 4
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 whydoidoit · Apr 20, 2013 at 08:34 PM 0
Share

Did you add some frequent Debug.Log statements? Or print?

avatar image HKFiftyOne · Apr 21, 2013 at 03:49 AM 0
Share

Actually, I have a footstep script, which plays a footstep sound depending on the tag of the mesh the player is on, and now that I think about it, it does print whatever object the player is on, like "Concrete", "Wood", "Carpet", print, not Debug.Log, and actually I think it prints every frame. Could that be the problem? The thing that confused me a little though is that it ran fine before, even with the print statements.

avatar image xolan007 · Apr 21, 2013 at 08:28 AM 0
Share

Dont use print for that because it prints the text every frame its better to use Debug.Log because it prints only once per call so that may fix the problem. Another thing does it in the console say Failed to compute tensor inertia, because if it does that may cause lag. Search the internet to find out how to fix it.

avatar image whydoidoit · Apr 21, 2013 at 09:00 AM 0
Share

Debug.Logs are expensive because the walk the call stack (print probably does too, but I never use it). It's most likely you've just got something running on one object that is taking forever. You could try disabling parts of your scene to see if it suddenly speeds up.

1 Reply

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

Answer by HKFiftyOne · Apr 21, 2013 at 03:30 PM

I went through the objects in my scene, and while I was playing, I noticed I had some other things in the console, "[mecanim]: BindSkeleton: connot find Transform "right_door" I realized I had deleted parts of a door, which had a bunch of parts to it. I deleted it from the scene view, and sure enough, I'm getting around 30 fps now. And I'm sure getting rid of the print in the console would help too. Thanks for your help!

Comment
Add comment · 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

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

13 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

Related Questions

Editor lags after update 0 Answers

[Mobile] Performance issues on 4k displays 0 Answers

Inventory System (Specific question) -1 Answers

Replace GameObject vs. replacing mesh and material? 2 Answers

many prefabs. application Performance 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