playMaker

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

gamedivision

  • Full Member
  • ***
  • Posts: 227
Re: NGUI Integration (WIP)
« Reply #30 on: June 02, 2012, 01:49:17 PM »
would anyone know how i would deal with the popup list,i dont actually have individual colliders for different buttons it generates,it also generates the buttons at run time,


thanks
« Last Edit: June 02, 2012, 02:01:38 PM by gamedivision »

mrbdrm

  • Playmaker Newbie
  • *
  • Posts: 39
Re: NGUI Integration (WIP)
« Reply #31 on: June 09, 2012, 01:23:22 PM »
would anyone know how i would deal with the popup list,i dont actually have individual colliders for different buttons it generates,it also generates the buttons at run time,


thanks
+1

Slimshader

  • Playmaker Newbie
  • *
  • Posts: 3
Re: NGUI Integration (WIP)
« Reply #32 on: June 10, 2012, 10:36:25 AM »
Maybe instead of collision boxes, you could use a 'Get Property' on the UIPopupLists's textLabel's property, set it to everyframe, then you could use a 'String Compare' set to everyframe, to watch for any user changes to fire off an event. :-\

amaranth

  • Full Member
  • ***
  • Posts: 172
Re: NGUI Integration (WIP)
« Reply #33 on: June 12, 2012, 10:53:27 PM »
This came at just the right time! Does anyone know how to block actions behind a button? For example, if you click a button, you don't want anything to happen to game objects behind the button.

Slimshader

  • Playmaker Newbie
  • *
  • Posts: 3


MUX

  • Playmaker Newbie
  • *
  • Posts: 43
    • @stefstivala
Re: NGUI Integration (WIP)
« Reply #36 on: June 16, 2012, 06:00:41 AM »
it seen that using set property cannot change ngui's sprite color, is that some way to change it??

is there a solution for this? trying to do it by set property > inherted > color but it resets the variable when i start


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: NGUI Integration (WIP)
« Reply #37 on: June 18, 2012, 02:08:38 AM »
Hi,

 I guess you mean that it set the color on a gui component when you actually want to get it and work from there:

So: Use "get property", store the color in your variable, and then you modify this color and inject it back using "set property"

 bye,

 Jean

mrbdrm

  • Playmaker Newbie
  • *
  • Posts: 39
Re: NGUI Integration (WIP)
« Reply #38 on: June 24, 2012, 12:59:35 PM »
Hi
i have 2 FSMs in one object and i want to send the OnClick to FSM #2 but the script only send the commands to the first FSM . any way around this ?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: NGUI Integration (WIP)
« Reply #39 on: June 25, 2012, 01:18:26 AM »
Hi,

You can send an event to a gameObject which will send that event to all the FSM attached to this gameObject.

Have you tried that? What technic do you use currently?

 bye,

 Jean

mrbdrm

  • Playmaker Newbie
  • *
  • Posts: 39
Re: NGUI Integration (WIP)
« Reply #40 on: June 25, 2012, 03:38:34 AM »
Hi
i have used the script in the first post .
and i ended up deleting the 2nd FSM , no mater how i try it will never trigger the action on the second FSM

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: NGUI Integration (WIP)
« Reply #41 on: June 25, 2012, 04:26:52 AM »
Hi,

 If you are sending a message to the gameObject, then yes, the first component is picked up.

 the solution when that happens is to reference the Fsm component directly, the trick is to drag the component itself, not the gameObject, because dragging the gameObject will pick the first FSM component.


Bye,

 Jean

alternativee30

  • Playmaker Newbie
  • *
  • Posts: 24
Re: NGUI Integration (WIP)
« Reply #42 on: July 02, 2012, 10:14:59 PM »
How would i go about doing an OnPress released (or up) instead of pressed? I know OnPress is set up as a bool.

How do i make a playmaker action that sends OnPress as up instead of down?

Edit**

Fixed

OnPress event seems to toggle the bool for me. Heres a picture.
« Last Edit: July 03, 2012, 06:22:29 PM by alternativee30 »

mrbdrm

  • Playmaker Newbie
  • *
  • Posts: 39
Re: NGUI Integration (WIP)
« Reply #43 on: July 09, 2012, 09:17:20 AM »
i dont know if its a playmaker related problem but i will ask  ;D
why does all action like mouse pick and raycast dosent detact the objects on the NGUI ? how can i do it right ?

amaranth

  • Full Member
  • ***
  • Posts: 172
Re: NGUI Integration (WIP)
« Reply #44 on: July 09, 2012, 01:06:13 PM »
I'm still learning NGUI myself, but this is what I've observed...

If you look in the scene view, you'll notice that your NGUI items are very small compared to everything else in the scene. NGUI uses a different camera than the one you use for your scene. So when you look in the game view, you see the output for both cameras. If you try to use raycasting on the main camera, your chances of encountering an NGUI item is unlikely because what you see in Game View is not how things are actually positioned in Scene View. (I tried to change the size of things viewed by the main camera, but NGUI just re-sized its components to be even smaller.)

I'm not sure how NGUI makes it possible to detect button clicks in Game View. To detect raycasting, I'm putting an empty game object with a box collider behind the NGUI items, using the main camera. If you figure out a better way, maybe you can share? .