playMaker

Author Topic: NGUI and Playmaker[SOLVED]  (Read 2099 times)

mweyna

  • Full Member
  • ***
  • Posts: 242
NGUI and Playmaker[SOLVED]
« on: January 22, 2014, 03:36:18 AM »
So in my scene I have a UI element as a UI Texture (via NGUI) hooked to my main camera. It has a Texture of "Icon_Unselected," I want it when pressed to change to "Icon_Selected" briefly and return to then it's "Icon_Unselected" texture. However I don't see any playmaker hook in that alter UITexture attribues on NGUI. However exactly would I have it so I can script up a "OnClick" FSM action to change the look of the NGUI button?
« Last Edit: January 24, 2014, 06:35:00 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: NGUI and Playmaker
« Reply #1 on: January 22, 2014, 07:37:52 AM »
Hi,

 That's something you should do entirely using ngui component setup without any scripting or playmaker, using the regular buttons and sprite behaviors.

anyway: You'll need to use "set property" action and target your UITexture and set "MainTexture/texture" property.

bye,

 Jean

mweyna

  • Full Member
  • ***
  • Posts: 242
Re: NGUI and Playmaker
« Reply #2 on: January 23, 2014, 02:55:21 AM »
So for the Set Property, I'd want the guiTexture.texture property? I dont see anything called Maintexture.texture.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: NGUI and Playmaker
« Reply #3 on: January 23, 2014, 07:16:45 AM »
Hi,

 Are you truly dragging the component itself, not the gameobject? if you drag the gameobject then you only access the property of the gameobject itself, not its components.

bye,

 Jean

mweyna

  • Full Member
  • ***
  • Posts: 242
Re: NGUI and Playmaker
« Reply #4 on: January 23, 2014, 12:05:43 PM »
So I managed to mimic the button example in the NGUI Playmaker samples with some success and bypass the whole issue. Just a lot of different things I had to setup slightly different, but all comes with the being a rookie with NGUI.