UIEffect is an effect component for uGUI element in Unity. Let's decorate your UI with effects!
UIEffect provides visual effect components for Unity UI.
<< Description | WebGL Demo | Installation | Usage | Example of using | Change log | Support >>
Let's decorate your UI with effects! You can control parameters as you like from the script as well as inspector. AnimationClip is supported as a matter of course!
Component | Features | Screenshot |
---|---|---|
UIEffect | Combine some visual effects. Effect Mode: Grayscale, Sepia, Nega, Pixelation Color Mode: Multiply, Fill, Additive, Subtract Blur Mode: Fast, Medium, Detail Advanced Blur: Enable more beautiful blurring. |
|
UIShiny | Apply shining effect to a graphic. The effect does not require Mask component or normal map. Parameters: Effect factor, Width, Rotation, Softness, Brightness, Gloss |
|
UIDissolve | Apply dissolve effect to a graphic. Color Mode for edge: Multiply, Fill, Additive, Subtract Parameters: Effect factor, Width, Rotation, Softness, Edge color Options: Effect area, Keep effect aspect ratio |
|
UIHsvModifier | Modify HSV for graphic. Target: Color, Range Adjustment: Hue, Saturation, Value |
|
UITransition Effect | Apply transition effect with a single channel texture. Effect Mode: Cutoff, Fade, Dissolve Options: Effect area, Keep effect aspect ratio, transition texture Pass Ray On Hidden: Disable the graphic's raycastTarget on hidden. |
Component | Features | Screenshot |
---|---|---|
UIShadow | Add shadow/outline to a graphic. The performance is better than the default Shadow/Outline component. ShadowStyle: Shadow, Shadow3, Outline, Outline8 |
|
UIGradient | Change vertex color as gradient with angle and offset. Direction: Horizontal, Vertical, Angle, Diagonal Options: Offset, Color space |
|
UIFlip | Flip a graphic. Direction: Horizontal, Vertical, Both |
This package is available on OpenUPM. You can install it via openupm-cli.
openupm add com.coffee.ui-effect
Find the manifest.json file in the Packages folder of your project and edit it to look like this:
{
"dependencies": {
"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git",
...
},
}
To update the package, change suffix #{version}
to the target version.
"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git#4.0.0",
Or, use UpmGitExtension to install and update the package.
Packages
(It works as an embedded package. For Unity 2018.1 or later)Assets
(Legacy way. For Unity 2017.1 or later)Package Manager
window and select UI Effect
package in package list and click Demo > Import in project
buttonAssets/Samples/UIEffect/Import Demo
from menuThe assets will be imported into Assets/Samples/UI Effect/{version}/Demo
.
Open `
Add Component
in inspector or Component > UI > UIEffect > ...
menu.var uieffect = gameObject.AddComponent<UIEffect>();
uieffect.effectMode = EffectMode.Grayscale;
uieffect.effectFactor = 0.85f;
uieffect.colorMode = ColorMode.Add;
uieffect.effectColor = Color.white;
uieffect.colorFactor = 0.1f;
uieffect.blurMode = BlurMode.FastBlur;
uieffect.blurFactor = 1;
UIEffect can easily be used in a variety of cases in the game.
Case | Description | Screenshot |
---|---|---|
Lock/unlock contents | Use UIEffect to apply grayscale. Indicate to user that the content is unavailable. |
|
Silhouette | Use UIEffect for filling color. | |
Soft shadow/ Outer glow |
Use UIEffect and UIShadow to blur the shadow. | |
Colored shadow | Use UIEffect and UIShadow to fill shadow with color. | |
Blurred dynamic font | Use UIEffect to blur text. To blur dynamic font cleanly, enable Advanced Blur option. |
|
Text with outline & shadow | Use two UIShadows to add outline and shadow. There is less overdraw than default Outline/Shadow. |
|
Shining button | Use UIShiny for shining button. Indicate to user that you can press the button. |
|
Screen transition | Use UITransitionEffect to transition the screen with any transition texture. |
This is an open-source project that I am developing in my free time. If you like it, you can support me. By supporting, you let me spend more time working on better tools that you can use for free. :)