Search Feedback

45
votes

Flatten UI (Canvas Group or Shader wise) to alpha fade it like Flash did with "BlendMode.LAYER"

GUI

-

-

Long ago in flash, we could select a blend mode named "Layer".
This allowed you to blend multiple layers/objects things as one.

Good example: I have a solid white image. Behind it, in the same panel, i add an image of a duck.
Now i blend the parent object with a canvas group, and you can clearly see the duck appearing during the fade until both are alpha 0f;

Obviously, in some cases we do not want to reveal the duck. We simply want to see the white square fade away.

There are many use cases in which you want this effect, often when blending in/out entire popups with layers of stuff on it.

Let us say i have a 9sliced border for the popup to fill 3/4th of my screen. On the top i want a header, so i place the same 9sliced border, smaller, behind the main popup on the top side of the popup. So i now have 3/4th of that 2nd image popping up from behind the original. Kind of looks like a "tab" and it looks sweet.

Until i fade that example, then you see what i did there, and it looks ugly as all hell and you need to make a 2nd graphic for it to show up properly.

The only current work around is either using more graphics to solve your issue otherwise. (often using more transparent images/pixels, which is slower)
Or to use a camera + render texture for that layer, but that is beyond inconvenient in most use cases and way too slow to use.

Example posts related to this:
https://forum.unity3d.com/threads/fading-groups-of-objects.285450/#post-1887575
http://answers.unity3d.com/questions/1016519/flatten-canvas-group-before-fading-alpha-hiding-ui.html

Comments (1)

  1. Ac6a384bb580c2c835258aa03e731db5?d=mm

    kvanlin-fantazm

    Jan 16, 2017 10:47

    Definitely! We need this as soon as possible, we use Unity for a lot of UI based games/apps and this would make our lives easier.

Your opinion counts

Help us make things better. Share your great idea for improving Unity or vote for other people’s.

Log in to post a new idea

Categories

All

(8365)

2D

(197)

Ads

(31)

AI & Navigation

(50)

Analytics

(80)

Animation

(275)

Asset Store

(189)

Assets

(474)

Audio

(145)

Cloud Build

(86)

Collaborate

(11)

Docs & Tutorials

(172)

Editor

(1936)

Everyplay

(13)

Game Performance Reporting

(10)

General

(751)

Graphics

(699)

GUI

(335)

Input

(138)

Licensing

(68)

Networking

(141)

Physics

(314)

Platforms

(394)

Profiling & Optimization

(63)

Runtime

(146)

Scripting

(942)

Terrain

(149)

WebGL

(126)