playMaker

Author Topic: Avoiding GUIRepaint to strive for optimization.[SOLVED]  (Read 5246 times)

ramones

  • Playmaker Newbie
  • *
  • Posts: 42
Avoiding GUIRepaint to strive for optimization.[SOLVED]
« 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.
« Last Edit: July 29, 2013, 05:09:05 AM by jeanfabre »

ramones

  • Playmaker Newbie
  • *
  • Posts: 42
Re: Avoiding GUIRepaint to strive for optimization.
« Reply #1 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.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Avoiding GUIRepaint to strive for optimization.
« Reply #2 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...

ramones

  • Playmaker Newbie
  • *
  • Posts: 42
Re: Avoiding GUIRepaint to strive for optimization.
« Reply #3 on: July 22, 2013, 05:46:39 AM »
It is working ok now. Thanks.