Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ramones on July 18, 2013, 06:38:59 PM

Title: Avoiding GUIRepaint to strive for optimization.[SOLVED]
Post by: ramones on July 18, 2013, 06:38:59 PM
Hi,

I'm optimizing my game this days and one of the things I'm trying is to remove all OnGUI realted stuff from my code (I target v6a android devices).

I have noticed that one can disable the use of GUILayout from the PlayMaker GUI behaviour that appears in every scene. The problem is that I can see in the profiler spikes produced by GUI.Repaint that are related to PlayMaker after disabling the GUILayout option. Is there any possibility to disable the use of OnGUI's from playmaker?

Thanks in advance.
Title: Re: Avoiding GUIRepaint to strive for optimization.
Post by: ramones on July 21, 2013, 04:12:57 PM
Hi!,

Sorry to bump the post but I would really like if there's any thing I could do to remove the repaint calls. Alex do you have any suggestion?

Thanks in advance.
Title: Re: Avoiding GUIRepaint to strive for optimization.
Post by: Alex Chouls on July 21, 2013, 08:58:28 PM
If you're not using any GUI actions you can remove the PlayMakerGUI component from the scene. This will remove all Unity GUI calls.

You can also turn off the Auto Add PlayMakerGUI option in preferences.

It's strange if you're seeing higher GUI.repaint costs with GUILayout disabled. The repaint should take the same amount of time, but you shouldn't pay any layout cost... If you can confirm that's what you're seeing I'll try to repro here...
Title: Re: Avoiding GUIRepaint to strive for optimization.
Post by: ramones on July 22, 2013, 05:46:39 AM
It is working ok now. Thanks.