playMaker

Author Topic: Set GUI Texture[SOLVED]  (Read 2829 times)

clummzie

  • Playmaker Newbie
  • *
  • Posts: 3
Set GUI Texture[SOLVED]
« on: June 28, 2013, 04:11:26 AM »
Hi,

Apologies for such a simple query but I'm completely stumped after much googling!

I'm trying to change the image on a NGUI panel texture using Playmaker when a button is clicked (from what is set in the inspector)

The state is firing but the new image isn't loaded.
Also tried 'Set GUI Text' which also has no effect.

Am I going about this the wrong way?!
« Last Edit: July 05, 2013, 03:44:43 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Set GUI Texture
« Reply #1 on: July 02, 2013, 02:53:43 AM »
Hi

there is no texture on NGUI Panel. Can you precise how you have it set up?

if you have regular sprite, one way is to have both, and enable disable them in turn. that would do it.


bye,

 Jean

clummzie

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Set GUI Texture
« Reply #2 on: July 02, 2013, 07:04:52 AM »
Hi Jean,

I'm adding a 'texture' (not a sprite) to a NGUI panel using the 'Widget Tool'.

The images are not part of the Atlas as there are many and quite large in size.

I can then add an image to it using the inspector but really I want to load an image dynamically depending on which checkbox is selected.

This is what doesn't work and there is no error.

Hope this is a bit clearer.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Set GUI Texture
« Reply #3 on: July 03, 2013, 02:03:53 AM »
Hi,

 ok, so you need to use "set property" action here. Drag the NGUI texture component itself onto your state, then you'll be presented with all it's properties, and you can then change the texture.

try this, if that doesn't work, I'll make a example.

bye,

 Jean

clummzie

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Set GUI Texture
« Reply #4 on: July 04, 2013, 09:34:31 AM »
That worked a treat!
Thanks Jean.