Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Spunkyinteractive on December 04, 2016, 09:50:06 PM
-
Currently i have placed each of my menus under a parent object each of which has a 'canvas group' on it. With this setup I use the 'u gui canvas group set alpha' action to have my menu fade in and out. However, the issue here is that the 'canvas group' component forces all children objects to have their raycasts turned on or off. Since some objects are buttons i cant just have raycasts all turned off, however raycasts are expensive for perf and unity best practices suggests to turn off raycasts on any objects that dont require them (ie. text objects).
Is there an action that takes advantage of other unity calls in order to fade a canvas? Or any other way of going about fading entire blocks of ui without forcing raycasts on?
For example https://docs.unity3d.com/ScriptReference/UI.Graphic.CrossFadeAlpha.html
thanks,
-Stephen
-
Hi,
ok, I added crossFadeAlpha and crossFadeColor actions for uGui. It's on the Ecosystem :)
Bye,
Jean
-
Is this action still working? I tried in my project and I cannot make it work. My Image component doesn't show up any changes when I activate it.
EDIT: It does. But it won't work if you have a Finished event in the action. (but you can add a wait for the crossfade to finish before continue)
-
unable working
-
Here's a dirty trick and take it as a last resort option, but with an alpha of just one point above zero, users won't see anything but Unity will still see the element that's been faded out.