Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: derkoi on January 23, 2013, 01:55:07 PM
-
Hi,
I've recently been trying to optimise my game and in the profiler noticed this:
https://www.dropbox.com/s/9im7uuksm4n4m99/Screen%20Shot%202013-01-23%20at%2018.49.37.png
What is PlaymakerGUI.OnGUI() ? It seems to be taking a fair chunk of performance there.
-
PlaymakerGUI.OnGUI() is called by the PlayMakerGUI component. Typically auto-added to the scene as a PlayMakerGUI GameObject.
If you don't use any actions that call OnGUI you can delete or disable PlayMakerGUI. You can also disable auto-adding of the PlayMakerGUI in Preferences.
If you do use actions that call OnGUI, PlayMakerGUI optimizes calls to OnGUI by using only one OnGUI call instead of one per GameObject (a typical performance problem with OnGUI). If you don't use GUILayout you can get a little performance back by unchecking Use GUILayout.
NOTE: State labels are also drawn by PlayMakerGUI, so you might want to still keep it around while debugging...
-
Thanks Alex, I'll have a play around with those. :)
-
Hi,
Ok, You have two thread on this right? indeed, using Unity gui system for mobiles is a bad idea, you should use a 2d framework optimized for mobile like nGUI and the like.
bye,
Jean
-
I am using NGUI. I since followed what Alex suggested and removed the PlayMakerGUI object (and turned it off from the options menu)