playMaker

Author Topic: show variables  (Read 4507 times)

santelia

  • Junior Playmaker
  • **
  • Posts: 78
show variables
« on: June 14, 2012, 12:51:06 PM »
Could anyone suggest a way to show the name and the content of many variables while running?
Let's say I have to check if anything is ok with some bool, int, game object, etc... all global variables.

And do you have a hint for local ones?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: show variables
« Reply #1 on: June 14, 2012, 03:33:36 PM »
hi,

 Use the editor for this, the values are shown live. Also you can check variable to show up in the inspector in their Fsm component. This s handy as well.

If you want to show variables of a published scene , then you'll have to build your own gui for this, which could turn to be quite a task.


 Bye,

 Jean

santelia

  • Junior Playmaker
  • **
  • Posts: 78
Re: show variables
« Reply #2 on: June 18, 2012, 03:09:32 AM »
Could you give me a quick brief and tips on the correct sequence? I mean for the creation of proper gui elements, instantiation, rendering, etc? Basically I only need to display the values of 3 variables in 3 specific places over the rest of my GUI, which is all made of textures (you know, status bars, compass, radar, gui background, etc) and already running well.
« Last Edit: June 18, 2012, 04:58:20 AM by santelia »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: show variables
« Reply #3 on: June 18, 2012, 06:01:03 AM »
Hi,

1: select a variable in the playmaker editor ( the "variable" tab),
2: check the option "show in inspector"
3: In the Unity inspector, locate that Fsm Component, and it will list that variable in the inspector, you can edit it as well as simply watch it.

Note that it is also true for events, it can be shown in the inspector as a button, so you can conveniently trigger it . So for example if you have a global transition with event "DO SOMETHING", you will be able to trigger it from tje unity inspector on that fsm component. It's very handy.

 bye,

 Jean

santelia

  • Junior Playmaker
  • **
  • Posts: 78
Re: show variables
« Reply #4 on: June 18, 2012, 09:41:07 AM »
Thank you Jean, but I meant the sequence to build a simple text gui (with text formatting and x,y positioning) that I can blend over the other gui layers.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: show variables
« Reply #5 on: June 19, 2012, 06:52:35 AM »
Hi,

 That won't happen, the gui layer is the top most layer, and you won't be able to inject anything on top. And Unity gui is not able to format texts... which is a real pity...

So your solution is to build everything not using the gui from unity, but something like ngui, or ezgui.

 Bye,

 Jean