playMaker

Author Topic: Toggle visibility of GUI isn't working [SOLVED]  (Read 2019 times)

fromfame

  • Junior Playmaker
  • **
  • Posts: 65
  • Sloppy PM Veteran
    • View Profile
Toggle visibility of GUI isn't working [SOLVED]
« on: March 12, 2013, 09:31:45 AM »
Hey im fairly new,
so this thing is all about having a convo with an NPC.

im using NGUI from the asset store for generating my GUI,
you can probably tell whats going on down below, GUI's visibility isnt being toggled when the player enters the BOX trigger.

I've tested it on the sphere it works perfectly, i tried using the "Set GUI Alpha" action tho im not sure where i'm going with that, anyone can supply me with a detailed answer please?

thanks guys!
« Last Edit: July 10, 2013, 03:04:23 AM by fromfame »

Mayhem

  • Full Member
  • ***
  • Posts: 171
    • View Profile
Re: Toggle visibility of GUI isn't working
« Reply #1 on: March 12, 2013, 09:43:43 AM »
I do not know exactly how this certain "Set GUI Alpha"-Action works, but you can try something different, especially when you work with nGUI.

Acess the UISprite-Component by "Set Property"-Action and access the Color-Property and select the Alpha (Color.a), and set it to 0. At least, that's how i do it.

Of course, if someone knows another (better!) way to solve that, feel free to correct me/ comment! :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14703
  • Official Playmaker Support
    • View Profile
Re: Toggle visibility of GUI isn't working
« Reply #2 on: July 09, 2013, 02:19:37 AM »
Hi,

 "Set Gui alpha" playmaker action only controls Unity GUI system, not NGUI.

Mayhem solution is good. Also spend time learning ngui, it features A LOT of component and behavior already meant to let you control things like that.

bye,

 Jean

fromfame

  • Junior Playmaker
  • **
  • Posts: 65
  • Sloppy PM Veteran
    • View Profile
Re: Toggle visibility of GUI isn't working
« Reply #3 on: July 10, 2013, 03:04:04 AM »
Awesome, Thanks guys!