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 /
avatar image
1
Question by Borr1310 · Oct 27, 2016 at 08:32 PM · androidbugprofilersettingsprofiler-error

Device.Present or GFX.WaitForPresent

working on simple Android 2D Game.(Unity Personal Edition)

GFX.WaitForPresent or Device.Present are huge. Every time it´s different, some day it´s Device.Present and other day it´s GFX.WaitForPresent.

I´ve been facing this problem for quite a while now and I thought i´d get rid of it when I am finished with the project. But.. I just couldn´t there was toooo much lag every time I built and ran. I´ve tried litterarly everything, there is no need to count all the things I tried, I can just tell you I followed this website http://atilkockar.com/on-unitys-gfx-waitforpresent-problem/ And I´ve probably seen every single question wondering about Device.Present error.

So I litterarly gave up on trying I know that this is one of the most searched errors but I was wondering if... (ALSO - I created a new project, changed the player settings to (com.productname....) set the built settings to android and profiled the game. Guess what.. device.present was at 70%) anybody fixed this error or should I say bug, and is there ANYTHING else to try?

If anybody reading this post is too building a 2D game for Android, I was wondering if he could screenshot all his main settings. Couse that would probably the only way to find the solution.

Thank you for reading!

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 hexagonius · Oct 27, 2016 at 09:42 PM 1
Share

I doubt that since it would be a completely different project. $$anonymous$$aybe showing screenshots of your game statistics window, profiler CPU and GPU might help. Have you gone over these?

https://docs.unity3d.com/$$anonymous$$anual/OptimizingGraphicsPerformance.html

avatar image Borr1310 hexagonius · Oct 28, 2016 at 02:38 PM 0
Share

Ah, sorry for not being clear what I said is.. I did create a new project and device.present was at 50-70%... and I was asking if anybody found the error thats why the parenthesis..

either way that´s the profiler with all my game objects deselected except for the main camera.

[1]: /storage/temp/81101-profiler.png

As you can see Device.Present is huge besides that, good thing to mention is there is target framerate jumping up to 50% about every 15 seconds.

And yes I have gone over this but obviously the problem is not in the game there has to be something wrong with my settings, If you want me to screenshot anything else just say it.. Thanks

profiler.png (54.7 kB)
profiler.png (322.5 kB)
avatar image tanoshimi · Oct 28, 2016 at 02:48 PM 0
Share

What's your vsync settings?

avatar image Borr1310 tanoshimi · Oct 28, 2016 at 03:43 PM 0
Share

![alt text][1]

off.... [1]: /storage/temp/81106-vsync-settings.png

vsync-settings.png (35.7 kB)

1 Reply

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

Answer by AurimasBlazulionis · Oct 28, 2016 at 09:11 PM

It will not go away. It is something that can not be profiled. It has to do something with V-sync as far as I am concerned (and vsync is forced on, on android). You should provide screenshot of the profiler window in your actual project, not the empty one. But if you look at the time how much it takes, it is really small. just 9 milliseconds. That means you can still get up to 100fps.

Comment
Add comment · Show 3 · 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 Borr1310 · Oct 29, 2016 at 08:25 AM 0
Share

[1]: /storage/temp/81134-profiler2.png

That´s profiling the normal game

profiler2.png (208.3 kB)
avatar image AurimasBlazulionis Borr1310 · Oct 29, 2016 at 08:40 AM 0
Share

You can see it is still 9 milliseconds which is very small hit (16 milliseconds = 60fps). And there is not really much you can do about it. As long as you keep your code not to use more than 5 milliseconds, you will be fine.

Also, it all depends on the device you are testing on.

avatar image Borr1310 AurimasBlazulionis · Oct 29, 2016 at 09:00 AM 0
Share

After your question I realized that I really was running make game on 60fps and the problem was I was instantiating my obstacles every 1.5 secs and they looked very laggy so I created a pool system and recycled them and that works fine now, thanks!

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

LogCat flooded with Skipping profile frame. 1 Answer

Unable to connect profiler through wire on unity 2019.2.1 0 Answers

Too many Profiler.BeginSample ?? 0 Answers

Android Device can't able to connect with Profiler 1 Answer

Android: Touch Input Timeout Issue 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