playMaker

Author Topic: Fade an object in/out  (Read 3104 times)

PET

  • Full Member
  • ***
  • Posts: 139
    • GamerPET
Fade an object in/out
« on: March 28, 2016, 09:29:31 AM »
Hello guys,

Is there any way to Fade In/Out the visibility of a game object?

What about a Image UI? Right now I'm doing it manually. I had to create an new animation then I'm calling a cross fade with PlayMaker. A bit of extra work to do. So I want to do this easier.

The main idea why I want to fade out a game object... well I want to fade out the Canvas UI which is in World. The problem is that Canvas UI does not have an Alpha that I can animate.

So, any ideas on how to do this easier without animations? I tired to drag & drop the "Image" component into PlayMaker to see if I can manipulate the Alpha of the image, but no luck. It's not on the list.

Thank You All!
Technical Game Designer
www.GamerPET.com

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Fade an object in/out
« Reply #1 on: March 29, 2016, 01:59:42 AM »
Hi,

 Insert a GameObject in your hierarchy with a Canvas group Component, it has an alpha property, and there is an action for this.

this way you can control an entire set of UI elements.

Bye,

 Jean

PET

  • Full Member
  • ***
  • Posts: 139
    • GamerPET
Re: Fade an object in/out
« Reply #2 on: March 30, 2016, 09:50:13 AM »
Hey Jean,

thanks for the reply. This is my current hierarchy:



So basically I want to dynamically fade out the whole UI-PickupPlayer.

I can't really find the alpha on the Canvas and i'm also not 100% what Action should I use. Set GUI Texture Alpha?

Someone suggested to just add an Image Component to a game object to get an alpha. Not sure if this is correct.

If this is correct I guess I could add a Set GUI Texture Alpha with an Animate Float?

Thank Again Jean <3

Technical Game Designer
www.GamerPET.com