playMaker

Author Topic: WebGL build - not retrieving button string variable  (Read 1720 times)

jkl2015z

  • Playmaker Newbie
  • *
  • Posts: 3
WebGL build - not retrieving button string variable
« on: August 20, 2015, 08:49:43 AM »
What's the best practise for multiple buttons to send their own unique string variable to a single 'FSM manager'? We have a version that works in the unityplayer but not WebGL.

We wanted to create something easy to administer i.e. add more buttons in with minimum effort that doesn't have loads of FSMs. So we did ..
Event Trigger - Pointer Down - PlaymakerFSM.name to set the name of the target 'FSM manager' and then that 'FSM Manager' retrieves it's new name. But like I say, this doesn't work in WebGL and probably isn't the best way to do it either.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: WebGL build - not retrieving button string variable
« Reply #1 on: August 20, 2015, 01:53:50 PM »
Hi,

 What technic do you use to retrieve the name? I don't get it. You should use the uGui proxies ( uGuiComponentProxy), this is likely to perform a lot better. It's on the Ecosystem,

Bye,

 Jean

jkl2015z

  • Playmaker Newbie
  • *
  • Posts: 3
Re: WebGL build - not retrieving button string variable
« Reply #2 on: August 20, 2015, 02:14:17 PM »
Thanks Jean, we came to  that conclusion and are just setting up a test using uGuiComponentProxy. Previously the Event Trigger>Pointer Down> sent PlayMakerFSM.name to the target FSM and changed the name of the FSM. This new name was then retrieved by the target FSM using Get Property gameObject.name

It works in unityplayer but not WebGL. We'll use uGuiComponetProxy now but seems something doesn't translate in the original method!?


jkl2015z

  • Playmaker Newbie
  • *
  • Posts: 3
Re: WebGL build - not retrieving button string variable
« Reply #3 on: August 20, 2015, 03:17:33 PM »
Going round in circles a bit here ... can't seem to retrieve the string we want.

What we are trying to achieve is when a button is pressed it sends a string to an FSM. The FSM retrieves the string.

What's the best way to send the string from button click and retrieve it at the FSM?