Playmaker Forum
PlayMaker Help & Tips => Android Help => Topic started by: ergin on May 27, 2016, 07:55:27 AM
-
Hello for the game I am developing right now GUI.Repaint consume %33 of CPU, Is this Normal?
(http://www.ergin3d.com/mike/profiler1.jpg)
game's youtube video
https://www.youtube.com/watch?v=mnXeekL9mcA (https://www.youtube.com/watch?v=mnXeekL9mcA)
Thanks.
-
I turned off Admob, it had no effect, I turned on deep profile:
(http://ergin3d.com/mike/profiler2.jpg)
-
:) After deep profile, to test if its the State Labels, I turned off "Show State Labels in Game" from Preferences / Debugging. This time game really slowed down:
Even If I turned it back-on or restarted the Unity frame rate dropped to 15fps
Unity 5.3.2f1- Playmaker 1.8.1
(http://ergin3d.com/mike/profiler3.jpg)
-
Sorry, I guess my bad... I turned off Enable Logging it turned to normal.
-
It's important to look at the ms, not just the percentage. In your first screenshot you're talking about less than 1ms. Unity's OnGUI actions are not super efficient, but often good enough. Were you seeing frame rate issues?
In the last screenshot it looks like something is spamming the debug console, causing the massive slowdown. What's in your console?
EDIT: Saw your note about logging. I would still try to track down what's spamming the console. You shouldn't have to turn off logging.
EDIT: Also are you using GUI actions?
-
Thanks Alex,
I guess I unintentionaly clicked "Forward Playmaker Log to Unity Log" It's the playmakers log. :)
I am constantly looking for ways to decrease cpu consumption, and regularly checking profiler as it is a mobile game, actually I am not super-satisfied with my frame-rates. I am trying to keep min. req. to Dual-core 1.2 GHz and Vivante GC1000 which sometimes drops below 30.
I am not using any GUI actions.
Thanks.
-
If you're not using GUI actions you can remove the PlayMakerGUI GameObject from the scene when you make a build (you might want to keep it around to debug in the editor). Also un-check "Automatically Add PlayMakerGUI" in Preferences.
When you checked "Forward Playmaker Log to Unity Log" was it just state transitions spamming the console, or any particular action?
-
It's just the state transitions. I'm using "wait" 0.1 and make distance and bool comparisons to spawn or reposition game objects which is technically a loop and that floods the playmaker transitions in the log.
Thanks.
-
Hi Ergin
I think i have the same issue you had but not sure, do you have any tips you could share with me as im new to using the profiler and should of really started using it when i first started my game. So much to learn.
-
This is currently the bane of my existance with no solution in sight.
-
Hi Ergin
I think i have the same issue you had but not sure, do you have any tips you could share with me as im new to using the profiler and should of really started using it when i first started my game. So much to learn.
96 ms, that's a lot but is it caused by the editor? in this case, have you tried to run on full screen?
Or are you profiling on a connected device (development for a mobile app)?
-
This is currently the bane of my existance with no solution in sight.
I thought the issue had been tracked to logging (which is very slow in the Unity editor). Is there another issue? Sorry, there are a few different issues discussed in the thread, and want to make sure I'm investigating the right thing!