Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: PET on March 28, 2016, 09:29:31 AM

Title: Fade an object in/out
Post by: PET 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!
Title: Re: Fade an object in/out
Post by: jeanfabre 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
Title: Re: Fade an object in/out
Post by: PET on March 30, 2016, 09:50:13 AM
Hey Jean,

thanks for the reply. This is my current hierarchy:
(http://puu.sh/nZqZ6/571cfdf7fe.png)
(http://puu.sh/nZr0J/adde986b50.png)

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