• Stars
    star
    5,584
  • Rank 7,297 (Top 0.2 %)
  • Language
    C#
  • License
    MIT License
  • Created over 7 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

UIEffect is an effect component for uGUI element in Unity. Let's decorate your UI with effects!

UIEffect

UIEffect provides visual effect components for Unity UI.


PRs Welcome

<< Description | WebGL Demo | Installation | Usage | Example of using | Change log | Support >>





Description

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!

thumbnail
image



Available effects

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.



The following effects can be used with the above components.
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





Demo

WebGL Demo





Installation

Requirement

  • Unity 2017.1 or later
  • No other SDK are required

Using OpenUPM (for Unity 2018.3 or later)

This package is available on OpenUPM. You can install it via openupm-cli.

openupm add com.coffee.ui-effect

Using Git (for Unity 2018.3 or later)

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.

  • e.g. "com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git#4.0.0",

Or, use UpmGitExtension to install and update the package.

For Unity 2018.2 or earlier

  1. Download a source code zip file from Releases page
  2. Extract it
  3. Import it into the following directory in your Unity project
    • Packages (It works as an embedded package. For Unity 2018.1 or later)
    • Assets (Legacy way. For Unity 2017.1 or later)





How to play demo

  • For Unity 2019.1 or later
    • Open Package Manager window and select UI Effect package in package list and click Demo > Import in project button
  • For Unity 2018.4 or earlier
    • Click Assets/Samples/UIEffect/Import Demo from menu

The assets will be imported into Assets/Samples/UI Effect/{version}/Demo.
Open `





Usage

  1. Add any effect component to UI element (Image, RawImage, Text, etc...) from Add Component in inspector or Component > UI > UIEffect > ... menu.
  2. Adjust the parameters of the effect as you like, in inspector.
  3. You can add or modify effects from the script.
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;

  1. Enjoy!





Example of using

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.





License

  • MIT
  • Β© UTJ/UCL





Support

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. :)

become_a_patron_on_patreon
become_a_sponsor_on_github

Author

mob-sakai

See Also

More Repositories

1

ParticleEffectForUGUI

Render particle effect in UnityUI(uGUI). Maskable, sortable, and no extra Camera/RenderTexture/Canvas.
C#
4,182
star
2

SoftMaskForUGUI

Enhance Unity UI (uGUI) with advanced soft-masking features to create more visually appealing effects!
C#
1,973
star
3

UnmaskForUGUI

A reverse masking solution for uGUI element in Unity.
C#
811
star
4

UpmGitExtension

This package extends the UI of Unity Package Manager (UPM) for the packages installed from git repository.
C#
764
star
5

ShinyEffectForUGUI

Shiny effect of uGUI, which does not need mask or normal map.
C#
380
star
6

CSharpCompilerSettingsForUnity

Change the C# compiler (csc) used on your Unity project, as you like!
C#
287
star
7

GitDependencyResolverForUnity

This plugin resolves git url dependencies in the package for Unity Package Manager. You can use a git url as a package dependency!
C#
249
star
8

StaticBluredScreen

Non-realtime (=static) screen blur for Unity. Easy to use background for dialogs.
C#
189
star
9

MeshEffectForTextMeshPro

Mesh effect components for TextMeshPro in Unity.
C#
153
star
10

UIEffectSnapshot

Capture a screenshot with effect and display it. Light-weight, non-realtime, no-camera (and no-PostProcessingStack), but be effective enough. The captured snapshot can be used as a background for a UI panel.
C#
142
star
11

CompositeCanvasRenderer

CompositeCanvasRenderer bakes multiple source graphics into a bake-buffer (RenderTexture) and renders it. Additional material modification, mesh modification, and baking effects are supported! Let's enjoy the effects that were difficult to implement with UI shaders, such as blur, soft outline, and soft shadow!
C#
136
star
12

AtlasImage

AtlasImage is a graphic component use SpriteAtlas for uGUI. In addition, add useful sprite selector and border editor to the inspector.
C#
130
star
13

MirrorReflectionEffectForUGUI

A simple mirror reflection effect for a uGUI without reflection probes or shaders.
C#
118
star
14

DissolveEffectForTMPro

DissolveEffectForTMPro provide dissolve effect component for TextMeshPro in Unity.
C#
109
star
15

SubAssetEditor

Editor for SubAsset in unity project.
C#
106
star
16

OpenSesameCompilerForUnity

A Roslyn compiler to access internals/privates for Unity. In other words, you can access to any internals/privates in other assemblies, without reflection. Let's say, "Open sesame!"
C#
102
star
17

ProjectBuilder

A tool for easy automating and customizing build process for Unity.
C#
97
star
18

UnityEventDrawerEx

This plugin extends the UnityEventDrawer to display runtime calls in the inspector.
C#
94
star
19

ShinyEffectForTMPro

ShinyEffectForTMPro provide shiny effect component for TextMeshPro in Unity.
C#
93
star
20

UIMaterialPropertyInjector

This package provides a component that allows easy modification/animation of material properties for Unity UI (uGUI) without the need for shader-specific custom components.
C#
91
star
21

unity-activate

A tool to activate Unity license.
TypeScript
84
star
22

DissolveEffectForUGUI

A dissolve effect for uGUI, without material instancing. Please star and watch this project :)
C#
79
star
23

UITransition

C#
56
star
24

CompositeToggle

Composite toggle system for unity
C#
46
star
25

ButtonEx

C#
44
star
26

BlurringAtlasForUGUI

A blur effect for uGUI in Unity, that is effective even for atlas images including dynamic fonts.
C#
42
star
27

docker-unity

New series of CI-specialised docker images for Unity. Superseding the famous gableroux/unity3d images.
Dockerfile
34
star
28

SymbolCatalog

A tool for edit script symbol define for Unity.
C#
34
star
29

MainWindowTitleModifierForUnity

A demo to change the text displayed in UnityEditor's title bar
C#
32
star
30

unity-changeset

Get/List Unity editor changeset
TypeScript
31
star
31

OpenSesame

A custom Roslyn compiler that allows access to internals/privates in other assemblies. Say "Open, Sesame!"
C#
30
star
32

SimpleBuildInterface

A simple build interface for Unity CLI. Support all platforms without executeMethod option.
C#
25
star
33

RotateMe

Rotate the object. (This repo is a tutorial for "How to develop a package for UnityPackageManager")
Shell
24
star
34

unity.package-manager.metadata

Contains metadata used by the com.unity.package-manager package to fulfill client requests
Shell
24
star
35

InternalAccessibleCompilerForUnity

Compile a c# project to a internal accessible dll (for Unity)
C#
22
star
36

UISystem

C#
20
star
37

ScrollEx

C#
16
star
38

AssetSystem

C#
15
star
39

UnityBuiltinShaders

Unity's built-in shaders.
15
star
40

VertexTextureFetchForUGUI

C#
11
star
41

InternalAccessibleCompiler

Compile a c# project to a internal accessible dll
C#
8
star
42

UniIx

Interactive Extensions for Unity for Unity
C#
7
star
43

JobcanExtensionForChrome

JavaScript
7
star
44

Demos

6
star
45

git-snapshot

git-snapshot is a command-line tool to take a snapshot of the directory and creates/updates another branch, like git subtree split --squash.
JavaScript
5
star
46

Coffee.Internal

Tools and snippets for package development
C#
5
star
47

unity-changeset-action

[GitHub Action] Get Unity editor change set for specific version
JavaScript
5
star
48

AtlasSystem

Atlas system for Unity
C#
4
star
49

UnityAdventCalendar2021

https://qiita.com/items/37978a030d6a6e262065
C#
3
star
50

ApiSystem

C#
3
star
51

mob-sakai.github.io

3
star
52

mob-sakai

2
star
53

unity-list-action

[GitHub Action] Get Unity editor versions for next jobs
JavaScript
2
star
54

actionsflow-workflow-test

2
star
55

UnityGitDependencyTest

A test repo for GitDependencyResolverForUnity
C#
1
star