playMaker

Author Topic: Performance issue?  (Read 2455 times)

derkoi

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Performance issue?
« on: January 23, 2013, 11:55:07 AM »
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.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3518
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Performance issue?
« Reply #1 on: January 23, 2013, 12: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...
« Last Edit: January 23, 2013, 12:32:01 PM by Alex Chouls »

derkoi

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: Performance issue?
« Reply #2 on: January 23, 2013, 12:35:45 PM »
Thanks Alex, I'll have a play around with those.  :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14014
  • Official Playmaker Support
    • View Profile
Re: Performance issue?
« Reply #3 on: January 24, 2013, 06: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

derkoi

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: Performance issue?
« Reply #4 on: January 24, 2013, 06: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)