playMaker

Author Topic: uGUI-Button  (Read 10320 times)

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
uGUI-Button
« on: December 13, 2014, 09:19:18 PM »
I am using the 'uGUI button event' action I downloaded.  I have it set up for instructions on a button to got to the last page and another button to go to the next page.  It gets to the event, waits and fires when I click on the button.  The problem is that after 2 uses it doesn't work the same.  It seems like it works the first 2 clicks and on the 3rd it doesn't

My question is does this new action work like the old GUI button event?  If not, then do you have to set up new buttons on the canvas and activate and deactive them each time you use them?  On the old action you could reuse the button on different states and it would do whatever the new state wanted to.

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: uGUI-Button
« Reply #1 on: December 13, 2014, 09:51:31 PM »
So after a little messing with it I found the BUG.  You can not reuse the same events for different button calls.

So if I have an event called 'go to planet2', then I can not use that on 2 different UIGUi states.   I had to rename the state to 'planet1GotoPlanet2' and create a new one called 'planet3gotoplanet2'.  The on a state I could use one and on another state use the 2nd.  Understand?

I am guessing the bug in the action remembers the last click.  It doesn't wipe it out so after a couple of clicks, it goes back to a previous click input.  What I mean is I click on next page and it goes to the next page, I do it again and its fine, but the 3rd time is fire a different event like last page.  hope this helps in fixing the bug.

Now the picture shows a little of what I mean.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: uGUI-Button
« Reply #2 on: December 14, 2014, 06:41:32 AM »
Hi,

 I can't reproduce this here, maybe you could share a repro scene? I don't think there are any problems with the proxy as far as getting confused with what to send to who, there may be a confusion of the scope of your setup and fsm logic.

 Bye,

 Jean

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: uGUI-Button
« Reply #3 on: December 14, 2014, 12:38:59 PM »
No problem with the logic.  It worked fine with the old GUI.  All I did was switch it out with the new IU GUI action.  There may be an issue that it fires automatically sometimes.  I have set up variables to test and 1 should go to 2, and 2 to 3, and so forth.  SOmetimes I get random numbers.  the logic on another screen has 8 of the new UIguis and it does it there as well.  I am 100% sure the new Ui gui action has a bug.  Now it could be the prefab or whatever as I have not tested the other new UI gui elements out yet but I am sure the button part is buggy.  I don't have a way to record the video right now.


Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: uGUI-Button
« Reply #4 on: December 14, 2014, 12:56:51 PM »
Can you post a repro scene?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: uGUI-Button
« Reply #5 on: December 14, 2014, 01:04:58 PM »
Hi,

 or pm us if you can't share publicly.

you are saying 8 proxies, do you mean you have 8 distinct buttons? could it be that some buttons overlaps and you think they are hidden or not in "focus" and so a sinle mouseclick touches 2 or more buttons? then all buttons would get an event being fired.

Is there any hidding/panel switching involved during this issue?

 This is something that may behaves differently with the legacy GUI system.

 Bye,

 Jean

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: uGUI-Button
« Reply #6 on: December 14, 2014, 04:49:24 PM »
I have 8 buttons.  they do not overlay at all.  I will try to get some screenshots.  But I am telling you, I am 100% certain there is a but on the action of the uiguibutton.  I have never been 100% sure of anything in my life.  I am making up a panel with the variables displaing to prove the variables are correct.  That will rule that out.

BTW:  These scenes worked fine with the old action script with GUI.  The only thing I changed was deleting them and putting in the new action with the uiguibutton.

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: uGUI-Button
« Reply #7 on: December 14, 2014, 04:52:36 PM »
"Can you post a repro scene?"

I'll can.  These are just the menus at the beginning of the game.  So I can send you all something.  I'll try to get pictures as well.  Let me finish setting up the test variables to help out.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: uGUI-Button
« Reply #8 on: December 14, 2014, 11:56:09 PM »
Hi,

what I am getting confused with is that you mention "uguiButton" "action", where this is a proxy actually, a monobehavior that helps you plug a UI Button Action with a PlayMaker Event,

There may be indeed an issue, but I'll need to repro in order to address it.

Bye,

 Jean

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: uGUI-Button
« Reply #9 on: December 15, 2014, 12:04:41 AM »
It is the button action I downloaded from here.  The pic shows what I am talking about.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: uGUI-Button
« Reply #10 on: December 15, 2014, 02:54:58 AM »
Hi,

 ok, I see, I was confused with the context. Yes indeed as I look at the code of this action, thee are potential issues, Let me run some tests on this and get back to you.


 Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: uGUI-Button
« Reply #11 on: December 15, 2014, 03:19:55 AM »
Hi,

 ok, please find a fixed version of this uGuiButtonEvent. I renamed it uGuiButtonOnClickEvent, because a lot more actions exists for each UI, and all should be soon supported.

Download it here: uGuiButtonOnClickEvent

 or you can browser for it using the ecosystem.


Tell me if things behaves better then. It should :)

 Bye,

 Jean

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: uGUI-Button
« Reply #12 on: December 15, 2014, 12:52:29 PM »
Wow!  That seems to have did the trick.  I changed out one menu (8 buttons) with this new action and they seems to work.  I'll change the others out in the next day or 2.  If There are any other issues, I'll let you know.  Good job.

BTW:  what was wrong with the CS script?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: uGUI-Button
« Reply #13 on: December 16, 2014, 02:37:38 AM »
Hi,

 Good :)

 What was wrong:

-- the registration for the button action was done every update, and it should be done only once.

-- the registration needs to be removed when the action is terminated, else the button still wants to call this action when its clicked, and if the action is still in the memory somehow, then it fires a event out of the blue which makes no sense within the logic of the fsm.


 Bye,

 Jean