playMaker

Author Topic: NGUI Integration (WIP) [NGUI 3.5.9 supported]  (Read 111064 times)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
  • Official Playmaker Support
    • View Profile
Re: NGUI Integration (WIP)
« Reply #150 on: November 14, 2013, 04:31:56 AM »
Hi,

 NGui 3.05 is not supported, you can grab the package on the wiki as usual:

https://hutonggames.fogbugz.com/default.asp?W1111

@Andy22: sorry I completly missed your post on this resetOnPlay issue, I'll address this asap.


bye,

 Jean

Andy22

  • Junior Playmaker
  • **
  • Posts: 99
    • View Profile
Re: NGUI Integration (WIP)
« Reply #151 on: December 12, 2013, 10:21:56 AM »

@Andy22: sorry I completly missed your post on this resetOnPlay issue, I'll address this asap.

Seems its still missing from the 3.05 compatible release, also there is a small change in 3.0.7 f2. Seems "Reset()" is now private and "ResetToBeginning()" should be used. We still want to reset before we actually do the play or toggle.

Code: [Select]
public void PlayTweeners()
{
...

if (resetOnPlay.Value) {
tw.ResetToBeginning();
}

// Toggle or activate the tween component
if (playDirection == Direction.Toggle) {
tw.Toggle();
}
else {
tw.Play(forward);
}

....
}

bye Andy

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
  • Official Playmaker Support
    • View Profile
Re: NGUI Integration (WIP)
« Reply #152 on: December 12, 2013, 10:56:32 AM »
Hi,

 that will teach me not writing it down... Sorry about that.

 It's now properly recored:

https://trello.com/c/c5lhe9hh/30-ngui-3-07

 bye,

 Jean.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
  • Official Playmaker Support
    • View Profile
Re: NGUI Integration (WIP)
« Reply #153 on: December 19, 2013, 04:34:17 AM »
Hi,

 Done, yuo can updated from the wiki. Can you double check it works as expected? thanks :)

Bye,

 Jean

Andy22

  • Junior Playmaker
  • **
  • Posts: 99
    • View Profile
Re: NGUI Integration (WIP)
« Reply #154 on: December 19, 2013, 07:33:13 AM »
Hi,

 Done, yuo can updated from the wiki. Can you double check it works as expected? thanks :)

Bye,

 Jean

Yep works and thx for spotting/moving it just into the Play() part and the Toggle logic.

bye Andy

Martin-Vaupell

  • Junior Playmaker
  • **
  • Posts: 69
  • Creating CarbonDiOxide
    • View Profile
    • Evisystems
Re: NGUI Integration (WIP) [NGUI 3.07 supported]
« Reply #155 on: December 27, 2013, 05:24:00 PM »

YES! why haven't i found this sooner.

Spend so many hours troubleshooting scripts for toggle and sliders
if i knew i could use playMaker for this..  damn..  <3 <3

Awesome work

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 298
    • View Profile
Re: NGUI Integration (WIP) [NGUI 3.07 supported]
« Reply #156 on: February 26, 2014, 08:09:46 AM »
I think I'm going to need some help with this new version.  I've been working with the UIEventsToPlaymakerFSM script for a long time. It was quite simple to use.  I just upgraded a project to NGUI 3.x, and imported the new Playmaker->NGUI tools Jean created, but there's so much more here that I'm a bit confused. 

What I want to do is mimic the functionality of the old UIEvents script, to receive events when a button is clicked on and use that to change states in my FSM. 
In the past I would create a custom global event that corresponded to the button I needed, such as OnClickSettings.  This new version seems to suggest I need to use these pre-made global events such as NGUI / ON CLICK for my FSM, however I'm not certain how the script determines which button was clicked in a GUI with multiple buttons. 

Am I just misunderstanding the functionality of this?  Or is there something else like a specific action I can use to get which button was clicked and then change states appropriately (which seems like more work)?

As always, thanks in advance.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
  • Official Playmaker Support
    • View Profile
Re: NGUI Integration (WIP) [NGUI 3.07 supported]
« Reply #157 on: February 26, 2014, 11:38:11 AM »
Hi,

 the UIEventsToPlaymakerFSM only works for the gameobject it is attached too, so it can't mix up ngui calls, UNLESS several UIEventsToPlaymakerFSM targets the same Fsm, which is something that is ok still, but definitly blurring the situation, prefer one fsm per UIEventsToPlaymakerFSM on the same gameobject, then you dispatch further to other fsm. then you won't get mixed up, I always do that.

bye,

 Jean

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 298
    • View Profile
Re: NGUI Integration (WIP) [NGUI 3.07 supported]
« Reply #158 on: February 26, 2014, 11:44:20 AM »
Ooof...   Man, this changes everything about how I've structured all my projects.

Before I could have my menu structure contained cleanly in a single manager gameobject, and send UI events from anywhere.  Now I basically have to turn everything into a relay-structure, is that right?

Thanks for taking the time to reply.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
  • Official Playmaker Support
    • View Profile
Re: NGUI Integration (WIP) [NGUI 3.07 supported]
« Reply #159 on: February 26, 2014, 11:50:53 AM »
Hi,

 Yeah, I guess so, I don't see this as "less clean", I actually would advocate that it will amke things a lot easier in the long term, more manageable, more granular, more controllable for fine tuning. ( like making a more complex sub widget for a given part of your UI, if you have a big manager for everything, then you are doom to refactor most of it, here if everything is local, higher parts won't be affected At all by su changes.

bye,

 Jean

cmy

  • Playmaker Newbie
  • *
  • Posts: 40
    • View Profile
Re: NGUI Integration (WIP) [NGUI 3.07 supported]
« Reply #160 on: February 27, 2014, 03:20:52 PM »
Hopefully this is the right place for my question. I am having an extremely difficult time getting OnSubmit to work from the Ngui events to Playmaker events. I have had no problem with all the other functions but I just can't seem to get an input field firing.

What I've done is created a simple input field from the ngui prefabs. I attached an fsm, Ive attached Ngui Events to Playmaker Events, I've attached Ngui events forwarder, and also applied the forwarder to On Submit Notify. I then created a state with Ngui>On Submit transition (I tried a global one as well) Is this incorrect? Clearly I am missing something. I can't find much other information on it.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
  • Official Playmaker Support
    • View Profile
Re: NGUI Integration (WIP) [NGUI 3.07 supported]
« Reply #161 on: March 04, 2014, 04:43:21 AM »
Hi,

 UIInput actually use the ngui click event if you press the "enter" key. Can you double check on your end you have this as well?

bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
  • Official Playmaker Support
    • View Profile
Re: NGUI Integration (WIP) [NGUI 3.5.6 supported]
« Reply #162 on: April 11, 2014, 11:09:23 AM »
Hi,

 New version to support 3.5.6 verison of ngui, with OnSubmit implemented and verifired ( sample available as well).

https://hutonggames.fogbugz.com/default.asp?W1111

Bye,

 Jean

RogueVapor

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
Re: NGUI Integration (WIP) [NGUI 3.5.6 supported]
« Reply #163 on: May 09, 2014, 08:54:51 AM »
Hi I'm trying to figure out if I can use the onChange event from an Ngui UIInput. I understand how to get the onSubmit event working, but I really need to have an FSM act without waiting for an enter key or leaving the field.

Any ideas, or is this being looked at?

Thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14819
  • Official Playmaker Support
    • View Profile
Re: NGUI Integration (WIP) [NGUI 3.5.6 supported]
« Reply #164 on: May 13, 2014, 10:15:51 PM »
Hi,

 ok, please updated from the wiki, I added a new event "NGUI / ON CHANGE" which will work for UIInput as well as UIToggle.

 Bye,

 Jean