Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: derkoi on January 23, 2013, 01:55:07 PM

Title: Performance issue?
Post 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.
Title: Re: Performance issue?
Post by: Alex Chouls on January 23, 2013, 02:27:27 PM
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...
Title: Re: Performance issue?
Post by: derkoi on January 23, 2013, 02:35:45 PM
Thanks Alex, I'll have a play around with those.  :)
Title: Re: Performance issue?
Post by: jeanfabre on January 24, 2013, 08:58:20 AM
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
Title: Re: Performance issue?
Post by: derkoi on January 24, 2013, 08:59:49 AM
I am using NGUI. I since followed what Alex suggested and removed the PlayMakerGUI object (and turned it off from the options menu)