Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by TobyKaos · May 02, 2016 at 09:05 AM · lags

1000 FPS but still lag

Hello I am making a 2D Side scroller and run at 1000 FPS. But I have trouble with some lags. Profiler says that the game runs neat to 1000 FPS but I have spike to 250 FPS every seconds (Gfx.waitForPresent).

Ok I now what it is: Graphics cards wait for vSync. But 1000 FPS and lag. WTF.

I have 3 plans of pooling object that I desactivate and activate when needed. I use Sprite Packer and to avoid texture loading lag I have added all sprites in an object on the scene (Cheap trick ineed) bu you cannot force unity to not unload sprites and destroy Atlas texture).

I use Physics Box2DCollider & Rigibody2D on my spawn and respawn point to detect Object. A rigidBody2D on my character and BoxCollider2D on Obstacles.

Graphics Setting is fast without shadows and light ... (1000 FPS, great but still lags)

I have only 1 camera and UI is on Overlay Canvas. No logs while objects spawn.

14 Atlas at 2048x2048 for objects.

For the ground and the background I use Texture Mapping to simulate movement.

Any ideas on how to avoid lag?

Edit: I desactivate all Objects one by one and even with 0 GameObject in the scene till have spikes Gfx.WaitForPresent from 1000 FPS to 250 FPS.

This cause a little lag every seconds and I cannot achieve a very smooth movement for the background objects. On Android tablet it is better than in the editor and WebGL release. But on IOS it is very jittered.

Comment
Add comment · Show 2
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 Fubiou · Oct 04, 2016 at 07:42 PM 0
Share

Same problem here.

avatar image SirCrazyNugget · Jun 27, 2017 at 09:44 PM 0
Share

Exact same issue.

Removed all objects, no scripts but an Update on camera, with *deltaTime Same issue if using LateUpdate, FixedUpdate...

Anyone found a fix for / cause of this

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by CarterG81 · Oct 10, 2017 at 07:53 PM

Make a build of your game with the following options:

  • Development Build = true

  • Autoconnect Profiler = true

Or just use Fraps & test.

The UnityEditor lies in the profiler & is horrible for determining performance. Don't rely on it at all.

Rely on what your actual build says. If it lags, then you have a real problem. Otherwise, it's just a fake problem due to the deception of the UnityEditor.

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

55 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 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 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

Huge Physics Spikes (In empty scene and populated scene) 6 Answers

micro lags in camera rotation in built game 0 Answers

How can I fix lag issues with Texture Packer in Unity? 0 Answers

Backround roll 0 Answers

Asset Store : Unable to navigate through asset samples (pngs...) 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