mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-11-19 17:22:37 +08:00
docs: update readme
This commit is contained in:
Symlink
+1
@@ -0,0 +1 @@
|
|||||||
|
./Packages/src/CHANGELOG.md
|
||||||
+110
-80
@@ -1,11 +1,12 @@
|
|||||||
# <img alt="logo" height="26" src="https://github.com/user-attachments/assets/dc72baf5-eadf-463e-abc9-464477fd0b9e"/> UIEffect v5 <!-- omit in toc -->
|
# <img alt="logo" height="26" src="https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-logo.png"/> UIEffect v5 <!-- omit in toc -->
|
||||||
|
|
||||||
[](https://openupm.com/packages/com.coffee.ui-effect/)
|
[](https://openupm.com/packages/com.coffee.ui-effect/)
|
||||||
[](https://github.com/mob-sakai/UIEffect/releases)
|
[](https://github.com/mob-sakai/UIEffect/releases)
|
||||||
[](https://github.com/mob-sakai/UIEffect/releases)
|
[](https://github.com/mob-sakai/UIEffect/releases)
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|

|
||||||

|

|
||||||

|

|
||||||
[](https://github.com/mob-sakai/UIEffect/blob/main/LICENSE.md)
|
[](https://github.com/mob-sakai/UIEffect/blob/main/LICENSE.md)
|
||||||
@@ -23,7 +24,7 @@
|
|||||||
UIEffect is an open-source package that allows you to intuitively apply rich Unity UI effects directly from the Inspector or via code.
|
UIEffect is an open-source package that allows you to intuitively apply rich Unity UI effects directly from the Inspector or via code.
|
||||||
Combine various filters, such as grayscale, blur, and dissolve, to decorate your UI with a unique visual style!
|
Combine various filters, such as grayscale, blur, and dissolve, to decorate your UI with a unique visual style!
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- [📌 Key Features](#-key-features)
|
- [📌 Key Features](#-key-features)
|
||||||
- [🎮 Demo](#-demo)
|
- [🎮 Demo](#-demo)
|
||||||
@@ -37,13 +38,28 @@ Combine various filters, such as grayscale, blur, and dissolve, to decorate your
|
|||||||
- [🚀 Usage](#-usage)
|
- [🚀 Usage](#-usage)
|
||||||
- [Getting Started](#getting-started)
|
- [Getting Started](#getting-started)
|
||||||
- [Component: UIEffect](#component-uieffect)
|
- [Component: UIEffect](#component-uieffect)
|
||||||
|
- [Tone Filter](#tone-filter)
|
||||||
|
- [Color Filter](#color-filter)
|
||||||
|
- [Sampling Filter](#sampling-filter)
|
||||||
|
- [Transition Filter](#transition-filter)
|
||||||
|
- [Target Mode](#target-mode)
|
||||||
|
- [Blend Type](#blend-type)
|
||||||
|
- [Shadow Mode](#shadow-mode)
|
||||||
|
- [Gradation Mode](#gradation-mode)
|
||||||
|
- [Edge Mode](#edge-mode)
|
||||||
|
- [Detail Filter](#detail-filter)
|
||||||
|
- [Others](#others)
|
||||||
- [Component: UIEffectTweener](#component-uieffecttweener)
|
- [Component: UIEffectTweener](#component-uieffecttweener)
|
||||||
- [Component: UIEffectReplica](#component-uieffectreplica)
|
- [Component: UIEffectReplica](#component-uieffectreplica)
|
||||||
- [Usage with TextMeshPro](#usage-with-textmeshpro)
|
- [Usage with TextMeshPro](#usage-with-textmeshpro)
|
||||||
- [Usage with SoftMaskForUGUI](#usage-with-softmaskforugui)
|
- [Usage with SoftMaskForUGUI](#usage-with-softmaskforugui)
|
||||||
|
- [Usage with ShaderGraph](#usage-with-shadergraph)
|
||||||
- [Runtime/Editor Preset for UIEffect](#runtimeeditor-preset-for-uieffect)
|
- [Runtime/Editor Preset for UIEffect](#runtimeeditor-preset-for-uieffect)
|
||||||
- [Usage with Code](#usage-with-code)
|
- [Usage with Code](#usage-with-code)
|
||||||
- [Project Settings](#project-settings)
|
- [Project Settings](#project-settings)
|
||||||
|
- [Settings](#settings)
|
||||||
|
- [Editor](#editor)
|
||||||
|
- [Shader](#shader)
|
||||||
- [:warning: Limitations](#warning-limitations)
|
- [:warning: Limitations](#warning-limitations)
|
||||||
- [🤝 Contributing](#-contributing)
|
- [🤝 Contributing](#-contributing)
|
||||||
- [Issues](#issues)
|
- [Issues](#issues)
|
||||||
@@ -57,7 +73,7 @@ Combine various filters, such as grayscale, blur, and dissolve, to decorate your
|
|||||||
|
|
||||||
## 📌 Key Features
|
## 📌 Key Features
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- **UIEffect is out-of-the-box!**: Easily apply effects by adjusting parameters directly in the inspector.
|
- **UIEffect is out-of-the-box!**: Easily apply effects by adjusting parameters directly in the inspector.
|
||||||
- **Rich effect combinations**: Decorate your UI with a variety of effects, such as grayscale, blur, and dissolve, by combining multiple filters and parameters.
|
- **Rich effect combinations**: Decorate your UI with a variety of effects, such as grayscale, blur, and dissolve, by combining multiple filters and parameters.
|
||||||
@@ -70,15 +86,17 @@ Combine various filters, such as grayscale, blur, and dissolve, to decorate your
|
|||||||
- **AnimationClip support**: Allows control of effect animations using `AnimationClips`.
|
- **AnimationClip support**: Allows control of effect animations using `AnimationClips`.
|
||||||
- **v4 compatible components (optional)**: For easy upgrading with minimal changes, compatible v4 components are available optionally.
|
- **v4 compatible components (optional)**: For easy upgrading with minimal changes, compatible v4 components are available optionally.
|
||||||
- **SoftMaskForUGUI support (optional)**: Compatible with SoftMaskForUGUI for creating soft masks for UI elements. See for more details [here](#usage-with-softmaskforugui).
|
- **SoftMaskForUGUI support (optional)**: Compatible with SoftMaskForUGUI for creating soft masks for UI elements. See for more details [here](#usage-with-softmaskforugui).
|
||||||
|
- **ShaderGraph support (optional)**: Add `Canvas (UIEffect)` sub target (material) for UIEffect shaders. See for more details [here](#usage-with-shadergraph).
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
## 🎮 Demo
|
## 🎮 Demo
|
||||||
|
|
||||||

|
|
||||||

|

|
||||||

|
<img src="https://github.com/mob-sakai/mob-sakai/releases/download/docs/uieffect5.7.0-demo-pattern.gif" width="582"/>
|
||||||

|

|
||||||
|

|
||||||
|
|
||||||
[WebGL Demo](https://mob-sakai.github.io/UIEffect/)
|
[WebGL Demo](https://mob-sakai.github.io/UIEffect/)
|
||||||
|
|
||||||
@@ -98,16 +116,16 @@ _This package requires **Unity 2020.3 or later**._
|
|||||||
```
|
```
|
||||||
- To update the package, use Package Manager UI (`Window > Package Manager`) or run the following command with `@{version}`:
|
- To update the package, use Package Manager UI (`Window > Package Manager`) or run the following command with `@{version}`:
|
||||||
```
|
```
|
||||||
openupm add com.coffee.ui-effect@5.6.0
|
openupm add com.coffee.ui-effect@5.7.0
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install via UPM (with Package Manager UI)
|
### Install via UPM (with Package Manager UI)
|
||||||
|
|
||||||
- Click `Window > Package Manager` to open Package Manager UI.
|
- Click `Window > Package Manager` to open Package Manager UI.
|
||||||
- Click `+ > Add package from git URL...` and input the repository URL: `https://github.com/mob-sakai/UIEffect.git?path=Packages/src`
|
- Click `+ > Add package from git URL...` and input the repository URL: `https://github.com/mob-sakai/UIEffect.git?path=Packages/src`
|
||||||

|

|
||||||
- To update the package, change suffix `#{version}` to the target version.
|
- To update the package, change suffix `#{version}` to the target version.
|
||||||
- e.g. `https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.6.0`
|
- e.g. `https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.7.0`
|
||||||
|
|
||||||
### Install via UPM (Manually)
|
### Install via UPM (Manually)
|
||||||
|
|
||||||
@@ -122,14 +140,14 @@ _This package requires **Unity 2020.3 or later**._
|
|||||||
```
|
```
|
||||||
|
|
||||||
- To update the package, change suffix `#{version}` to the target version.
|
- To update the package, change suffix `#{version}` to the target version.
|
||||||
- e.g. `"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.6.0",`
|
- e.g. `"com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git?path=Packages/src#5.7.0",`
|
||||||
|
|
||||||
### Install as Embedded Package
|
### Install as Embedded Package
|
||||||
|
|
||||||
1. Download the `Source code (zip)` file from [Releases](https://github.com/mob-sakai/UIEffect/releases) and
|
1. Download the `Source code (zip)` file from [Releases](https://github.com/mob-sakai/UIEffect/releases) and
|
||||||
extract it.
|
extract it.
|
||||||
2. Move the `<extracted_dir>/Packages/src` directory into your project's `Packages` directory.
|
2. Move the `<extracted_dir>/Packages/src` directory into your project's `Packages` directory.
|
||||||

|

|
||||||
- You can rename the `src` directory if needed.
|
- You can rename the `src` directory if needed.
|
||||||
- If you intend to fix bugs or add features, installing it as an embedded package is recommended.
|
- If you intend to fix bugs or add features, installing it as an embedded package is recommended.
|
||||||
- To update the package, re-download it and replace the existing contents.
|
- To update the package, re-download it and replace the existing contents.
|
||||||
@@ -140,6 +158,7 @@ Additional resources can be imported to extend functionality.
|
|||||||
|
|
||||||
- [🔄 Upgrading from v4 to v5](#-upgrading-from-v4-to-v5)
|
- [🔄 Upgrading from v4 to v5](#-upgrading-from-v4-to-v5)
|
||||||
- [Usage with TextMeshPro](#usage-with-textmeshpro)
|
- [Usage with TextMeshPro](#usage-with-textmeshpro)
|
||||||
|
- [Usage with ShaderGraph](#usage-with-shadergraph)
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
@@ -159,14 +178,13 @@ If upgrading from UIEffect v4 to v5, note the following breaking changes:
|
|||||||
```
|
```
|
||||||
|
|
||||||
2. Import the `v4 Compatible Components` sample from the Package Manager window.
|
2. Import the `v4 Compatible Components` sample from the Package Manager window.
|
||||||

|
|
||||||
|
|
||||||
3. All v4 components are obsolete.
|
3. All v4 components are obsolete.
|
||||||
- v4 `UIEffect` component is now `UIEffectV4` component. Change the reference in the code.
|
- v4 `UIEffect` component is now `UIEffectV4` component. Change the reference in the code.
|
||||||
- The `effectArea` property in some components are not supported in v5.
|
- The `effectArea` property in some components are not supported in v5.
|
||||||
- `UIShadow`, `UIGradient` components are not supported in v5.
|
- `UIShadow`, `UIGradient` components are not supported in v5.
|
||||||
- v4 components can be converted to v5 `UIEffect` component by selecting `Convert To UIEffect` from the context menu.
|
- v4 components can be converted to v5 `UIEffect` component by selecting `Convert To UIEffect` from the context menu.
|
||||||

|

|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
@@ -177,10 +195,10 @@ If upgrading from UIEffect v4 to v5, note the following breaking changes:
|
|||||||
1. [Install the package](#-installation).
|
1. [Install the package](#-installation).
|
||||||
|
|
||||||
2. Add a `UIEffect` component to a UI element (Image, RawImage, Text, TextMeshProUGUI, etc...) from the `Add Component` in the inspector or `Component > UI > UIEffect` menu.
|
2. Add a `UIEffect` component to a UI element (Image, RawImage, Text, TextMeshProUGUI, etc...) from the `Add Component` in the inspector or `Component > UI > UIEffect` menu.
|
||||||

|

|
||||||
|
|
||||||
3. Adjust the effect filters and parameters in the inspector.
|
3. Adjust the effect filters and parameters in the inspector.
|
||||||

|

|
||||||
|
|
||||||
4. Enjoy!
|
4. Enjoy!
|
||||||
|
|
||||||
@@ -190,7 +208,7 @@ If upgrading from UIEffect v4 to v5, note the following breaking changes:
|
|||||||
|
|
||||||
The `UIEffect` component applies visual effects to UI elements, allowing various effects to be achieved by combining multiple filters.
|
The `UIEffect` component applies visual effects to UI elements, allowing various effects to be achieved by combining multiple filters.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> From the top menu, you can load and save the editor presets or clear settings.
|
> From the top menu, you can load and save the editor presets or clear settings.
|
||||||
@@ -200,20 +218,20 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
|||||||
|
|
||||||
#### Tone Filter
|
#### Tone Filter
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- **Tone Filter**: `None`, `Grayscale`, `Sepia`, `Nega`, `Retro`, `Posterize`
|
- **Tone Filter**: `None`, `Grayscale`, `Sepia`, `Nega`, `Retro`, `Posterize`
|
||||||

|

|
||||||
- **Tone Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
- **Tone Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
#### Color Filter
|
#### Color Filter
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- **Color Filter**: `None`, `Multiply`, `Additive`, `Subtractive`, `Replace`, `Multiply Luminance`, `Multiply Additive`, `Hsv Modifier`, `Contrast`
|
- **Color Filter**: `None`, `Multiply`, `Additive`, `Subtractive`, `Replace`, `Multiply Luminance`, `Multiply Additive`, `Hsv Modifier`, `Contrast`
|
||||||

|

|
||||||
- **Color Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
- **Color Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
||||||
- **Color Glow**: Set the color to glow.
|
- **Color Glow**: Set the color to glow.
|
||||||
|
|
||||||
@@ -221,10 +239,10 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
|||||||
|
|
||||||
#### Sampling Filter
|
#### Sampling Filter
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- **Sampling Filter**: `None`, `Blur Fast`, `Blur Medium`, `Blur Detail`, `Pixelation`, `Rgb Shift`, `Edge Luminescence`, `Edge Alpha`
|
- **Sampling Filter**: `None`, `Blur Fast`, `Blur Medium`, `Blur Detail`, `Pixelation`, `Rgb Shift`, `Edge Luminescence`, `Edge Alpha`
|
||||||

|

|
||||||
- **Sampling Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
- **Sampling Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
||||||
- **Sampling Width**: The width of the sampling effect.
|
- **Sampling Width**: The width of the sampling effect.
|
||||||
|
|
||||||
@@ -232,19 +250,20 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
|||||||
|
|
||||||
#### Transition Filter
|
#### Transition Filter
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- **Transition Filter**: `None`, `Fade`, `Cutoff`, `Dissolve`, `Shiny`, `Mask`, `Melt`, `Burn`, `Pattern`
|
- **Transition Filter**: `None`, `Fade`, `Cutoff`, `Dissolve`, `Shiny`, `Mask`, `Melt`, `Burn`, `Pattern`
|
||||||

|

|
||||||
- **Transition Rate**: 0.0 (no effect) - 1.0 (full effect).
|
- **Transition Rate**: 0.0 (no effect) - 1.0 (full effect).
|
||||||
- **Transition Tex**: The texture used for the transition filter.
|
- **Transition Tex**: The texture used for the transition filter.
|
||||||
- **Scale**, **Offset**, **Speed**, **Rotation**, **Keep Aspect Ratio**, **Reverse**: Additional properties for the texture.
|
- **Scale**, **Offset**, **Speed**, **Rotation**, **Keep Aspect Ratio**, **Reverse**: Additional properties for the texture.
|
||||||
- NOTE: `Rotation` and `Keep Aspect Ratio` are shared with `Detail Filter`.
|
- ⚠️ NOTE: `Rotation` is shared with `Transition Filter` and `Detail Filter`.
|
||||||
|
- ⚠️ NOTE: `Keep Aspect Ratio` is shared with `Transition Filter` and `Gradation Mode` and `Detail Filter`.
|
||||||
- **Transition Width**: The width where the transition color is applied.
|
- **Transition Width**: The width where the transition color is applied.
|
||||||
- **Transition Pattern Range**: The range of the pattern.
|
- **Transition Pattern Range**: The range of the pattern.
|
||||||
- **Transition Pattern Reverse**: Reverse the pattern.
|
- **Transition Pattern Reverse**: Reverse the pattern.
|
||||||
- **Transition Softness**: The softness of the boundary for the transition color.
|
- **Transition Softness**: The softness of the boundary for the transition color.
|
||||||
- **Transition Color Filter**: Specifies the transition color.
|
- **Transition Color Filter**: `None`, `Multiply`, `Additive`, `Subtractive`, `Replace`, `Multiply Luminance`, `Multiply Additive`, `Hsv Modifier`, `Contrast`
|
||||||
- **Transition Color**: The color of the transition.
|
- **Transition Color**: The color of the transition.
|
||||||
- **Transition Color Glow**: Set the transition color to glow.
|
- **Transition Color Glow**: Set the transition color to glow.
|
||||||
- **Transition Auto Play Speed**: The speed of the transition animation (using shader side `_Time`). You can use this property to loop the `TransitionRate` without tweener or animation.
|
- **Transition Auto Play Speed**: The speed of the transition animation (using shader side `_Time`). You can use this property to loop the `TransitionRate` without tweener or animation.
|
||||||
@@ -253,16 +272,16 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
|||||||
> **Transition Tex** applies transitions using its alpha channel.
|
> **Transition Tex** applies transitions using its alpha channel.
|
||||||
> If you use `Scale`, `Offset`, or `Speed`, set `Wrap Mode = Repeat` in the texture import settings.
|
> If you use `Scale`, `Offset`, or `Speed`, set `Wrap Mode = Repeat` in the texture import settings.
|
||||||
> For details, refer to the textures included in the built-in presets.
|
> For details, refer to the textures included in the built-in presets.
|
||||||
> 
|
> 
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
#### Target Mode
|
#### Target Mode
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- **Target Mode**: `None`, `Hue`, `Luminance`
|
- **Target Mode**: `None`, `Hue`, `Luminance`
|
||||||

|

|
||||||
- Restricts the effect application area based on hue or luminance.
|
- Restricts the effect application area based on hue or luminance.
|
||||||
- **Target Range**: The range of target hue or luminance.
|
- **Target Range**: The range of target hue or luminance.
|
||||||
- **Target Softness**: The softness of the target boundary.
|
- **Target Softness**: The softness of the target boundary.
|
||||||
@@ -271,63 +290,61 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
|||||||
|
|
||||||
#### Blend Type
|
#### Blend Type
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- **Blend Type**: `Alpha Blend`, `Multiply`, `Additive`, `Soft Additive`, `Multiply Additive`, `Custom`
|
- **Blend Type**: `Alpha Blend`, `Multiply`, `Additive`, `Soft Additive`, `Multiply Additive`, `Custom`
|
||||||

|

|
||||||
- `Custom` blend type can be set using the `SrcBlend` and `DstBlend` properties.
|
- `Custom` blend type can be set using the `SrcBlend` and `DstBlend` properties.
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
#### Shadow Mode
|
#### Shadow Mode
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- **Shadow Mode**: `None`, `Shadow`, `Shadow3`, `Outline`, `Outline8`, `Mirror`
|
- **Shadow Mode**: `None`, `Shadow`, `Shadow3`, `Outline`, `Outline8`, `Mirror`
|
||||||

|

|
||||||
- **Shadow Distance**: Distance of the shadow or outline.
|
- **Shadow Distance**: Distance of the shadow or outline.
|
||||||
- **Shadow Iteration**: Number of times the shadow or outline is applied.
|
- **Shadow Iteration**: Number of times the shadow or outline is applied.
|
||||||
- **Shadow Color Filter**: Specifies the shadow color.
|
- **Shadow Color Filter**: `None`, `Multiply`, `Additive`, `Subtractive`, `Replace`, `Multiply Luminance`, `Multiply Additive`, `Hsv Modifier`, `Contrast`
|
||||||
- **Shadow Color**: The color of the shadow.
|
- **Shadow Color**: The color of the shadow.
|
||||||
- **Shadow Color Glow**: Set the shadow color to glow.
|
- **Shadow Color Glow**: Set the shadow color to glow.
|
||||||
- **Shadow Fade**: Alpha value of the shadow or outline.
|
- **Shadow Fade**: Alpha value of the shadow or outline.
|
||||||
- **Shadow Blur Intensity**: Intensity of the shadow or outline blur.
|
- **Shadow Blur Intensity** (`SamplingFilter = Blur***` required): Intensity of the shadow or outline blur.
|
||||||
- **Mirror Reflection**: Distance of the mirrored image.
|
- **Mirror Reflection** (`Mirror` only): Distance of the mirrored image.
|
||||||
- **Mirror Offset**: Offset for the mirrored image.
|
- **Mirror Offset** (`Mirror` only): Offset for the mirrored image.
|
||||||
- **Mirror Scale**: Scale of the mirrored image.
|
- **Mirror Scale** (`Mirror` only): Scale of the mirrored image.
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
#### Gradation Mode
|
#### Gradation Mode
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- **Gradation Mode**: `None`, `Horizontal`, `HorizontalGradient`, `Vertical`, `VerticalGradient`, `RadialFast`, `RadialDetail`, `Diagonal`, `DiagonalToRightBottom`, `DiagonalToLeftBottom`, `Angle`, `AngleGradient`
|
- **Gradation Mode**: `None`, `Horizontal`, `HorizontalGradient`, `Vertical`, `VerticalGradient`, `Radial`, `Diagonal`, `DiagonalToRightBottom`, `DiagonalToLeftBottom`, `Angle`, `AngleGradient`
|
||||||

|

|
||||||
|
- **Gradation Color Filter**: `None`, `Multiply`, `Additive`, `Subtractive`, `Replace`, `Multiply Luminance`, `Multiply Additive`
|
||||||
- **Gradation Gradient**: The gradient of the gradation.
|
- **Gradation Gradient**: The gradient of the gradation.
|
||||||
|
- `Blend` and `Fixed` modes are available.
|
||||||
- **Gradation Color 1**: The first color of the gradation.
|
- **Gradation Color 1**: The first color of the gradation.
|
||||||
- **Gradation Color 2**: The second color of the gradation.
|
- **Gradation Color 2**: The second color of the gradation.
|
||||||
|
- **Gradation Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
||||||
- **Gradation Offset**: The offset of the gradation range.
|
- **Gradation Offset**: The offset of the gradation range.
|
||||||
- **Gradation Scale**: The scale of the gradation range.
|
- **Gradation Scale**: The scale of the gradation range.
|
||||||
- **Gradation Rotation**: The rotation of the gradation range (`Angle` or `AngleGradient`).
|
- **Gradation Rotation** (`Angle` or `AngleGradient` only): The rotation of the gradation range.
|
||||||
|
- **Keep Aspect Ratio**:
|
||||||
> [!TIP]
|
- ⚠️ NOTE: `Keep Aspect Ratio` is shared with `Transition Filter` and `Gradation Mode` and `Detail Filter`.
|
||||||
> `Horizontal Gradient` and `Vertical Gradient` divide the mesh horizontally or vertically and apply a gradient.
|
|
||||||
> This is very fast but only supports Full Rect.
|
|
||||||
> `Angle Gradient` divides the mesh at the specified angle and applies a gradient.
|
|
||||||
> It can be applied to meshes other than Full Rect because it applies the gradient according to the original mesh shape.
|
|
||||||
> `Gradation Gradient` has two modes, `Blend` and `Fixed`.
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
#### Edge Mode
|
#### Edge Mode
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- **Edge Mode**: `None`, `Plain`, `Shiny`
|
- **Edge Mode**: `None`, `Plain`, `Shiny`
|
||||||

|

|
||||||
- **Edge Width**: The width of the edge.
|
- **Edge Width**: The width of the edge.
|
||||||
- **Edge Color Filter**: Specifies the edge color.
|
- **Edge Color Filter**: `None`, `Multiply`, `Additive`, `Subtractive`, `Replace`, `Multiply Luminance`, `Multiply Additive`, `Hsv Modifier`, `Contrast`
|
||||||
- **Edge Color**: The color of the edge.
|
- **Edge Color**: The color of the edge.
|
||||||
- **Edge Color Glow**: Set the shadow color to glow.
|
- **Edge Color Glow**: Set the shadow color to glow.
|
||||||
- **Edge Shiny Width**: The width of the edge shiny.
|
- **Edge Shiny Width**: The width of the edge shiny.
|
||||||
@@ -337,22 +354,23 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
|||||||
|
|
||||||
#### Detail Filter
|
#### Detail Filter
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- **Detail Filter**: `None`, `Masking`, `Multiply`, `Additive`, `Replace`, `MuliplyAdditive`
|
- **Detail Filter**: `None`, `Masking`, `Multiply`, `Additive`, `Replace`, `MuliplyAdditive`
|
||||||

|

|
||||||
- **Detail Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
- **Detail Intensity**: 0.0 (no effect) - 1.0 (full effect).
|
||||||
- **Detail Threshold** (`Masking` only): The minimum and maximum alpha values used for masking. The larger the gap
|
- **Detail Threshold** (`Masking` only): The minimum and maximum alpha values used for masking. The larger the gap
|
||||||
between these values, the stronger the softness effect.
|
between these values, the stronger the softness effect.
|
||||||
- **Detail Tex**: The texture used for the transition filter.
|
- **Detail Tex**: The texture used for the transition filter.
|
||||||
- **Scale**, **Offset**, **Speed**, **Rotation**, **Keep Aspect Ratio**: Additional properties for the texture.
|
- **Scale**, **Offset**, **Speed**, **Rotation**, **Keep Aspect Ratio**: Additional properties for the texture.
|
||||||
- NOTE: `Rotation` and `Keep Aspect Ratio` are shared with `Transition Filter`.
|
- ⚠️ NOTE: `Rotation` is shared with `Transition Filter` and `Detail Filter`.
|
||||||
|
- ⚠️ NOTE: `Keep Aspect Ratio` is shared with `Transition Filter` and `Gradation Mode` and `Detail Filter`.
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
#### Others
|
#### Others
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- **Sampling Scale**: The referencing scale during sampling.
|
- **Sampling Scale**: The referencing scale during sampling.
|
||||||
- Larger values are suitable for high-resolution textures.
|
- Larger values are suitable for high-resolution textures.
|
||||||
@@ -364,18 +382,19 @@ The `UIEffect` component applies visual effects to UI elements, allowing various
|
|||||||
- `Vertical`
|
- `Vertical`
|
||||||
- `Effect`: Flip with the effect.
|
- `Effect`: Flip with the effect.
|
||||||
- `Shadow`: Flip with the shadow.
|
- `Shadow`: Flip with the shadow.
|
||||||

|

|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> `Transition Filter`, `Gradation Filter`, and `Detail Filter` usually refer to their own `RectTransform` when applying effects.
|
> `Transition Filter`, `Gradation Filter`, and `Detail Filter` usually refer to their own `RectTransform` when applying effects.
|
||||||
> For example, if the mesh shape exceeds the `RectTransform` boundaries, the effect may not be applied correctly.
|
> For example, if the mesh shape exceeds the `RectTransform` boundaries, the effect may not be applied correctly.
|
||||||
> By specifying `Custom Root`, you can refer to the specified transform.
|
> By specifying `Custom Root`, you can refer to the specified transform.
|
||||||
|
> 
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
### Component: UIEffectTweener
|
### Component: UIEffectTweener
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
The `UIEffectTweener` component animates the effect, enabling easy control over effect animations without the need for an `AnimationClip`.
|
The `UIEffectTweener` component animates the effect, enabling easy control over effect animations without the need for an `AnimationClip`.
|
||||||
|
|
||||||
@@ -406,7 +425,7 @@ You can preview the animation using the seek bar and play button.
|
|||||||
|
|
||||||
### Component: UIEffectReplica
|
### Component: UIEffectReplica
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
The `UIEffectReplica` component applies visual effects to UI elements by replicating the settings of another `UIEffect` component. This allows the same effect to be applied across multiple UI elements simultaneously.
|
The `UIEffectReplica` component applies visual effects to UI elements by replicating the settings of another `UIEffect` component. This allows the same effect to be applied across multiple UI elements simultaneously.
|
||||||
|
|
||||||
@@ -414,16 +433,10 @@ The `UIEffectReplica` component applies visual effects to UI elements by replica
|
|||||||
> [!TIP]
|
> [!TIP]
|
||||||
> You can specify a preset as well as an instance as the target for `UIEffectReplica`.
|
> You can specify a preset as well as an instance as the target for `UIEffectReplica`.
|
||||||
- **Use Target Transform**: Use the target's transform for some effects.
|
- **Use Target Transform**: Use the target's transform for some effects.
|
||||||

|

|
||||||
- **Custom Root**: Use the custom transform for some effects.
|
- **Custom Root**: Use the custom transform for some effects.
|
||||||
- **Sampling Scale**: Override the sampling scale.
|
- **Sampling Scale**: Override the sampling scale.
|
||||||
- **Allow To Modify Mesh Shape**: If enabled, the mesh shape can be modified.
|
- **Allow To Modify Mesh Shape**: If enabled, the mesh shape can be modified.
|
||||||
- **Flip**:
|
|
||||||
- `Nothing`
|
|
||||||
- `Horizontal`
|
|
||||||
- `Vertical`
|
|
||||||
- `Effect`: Flip the effect.
|
|
||||||
- `Shadow`: Flip the shadow.
|
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
@@ -433,21 +446,20 @@ To use UIEffect with TextMeshPro, you need to import additional resources.
|
|||||||
When a shader included in the samples is requested, an import dialog will automatically appear.
|
When a shader included in the samples is requested, an import dialog will automatically appear.
|
||||||
Click the `Import` button.
|
Click the `Import` button.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Alternatively, you can manually import the resources by following these steps:
|
Alternatively, you can manually import the resources by following these steps:
|
||||||
|
|
||||||
1. First, you must import [TMP Essential Resources](https://docs.unity3d.com/Packages/com.unity.textmeshpro@3.0/manual/index.html#installation) before using.
|
1. First, you must import [TMP Essential Resources](https://docs.unity3d.com/Packages/com.unity.textmeshpro@3.0/manual/index.html#installation) before using.
|
||||||

|

|
||||||
|
|
||||||
2. Open the `Package Manager` window and select the `UI Effect` package in the package list and click the `TextMeshPro Support > Import` button.
|
2. Open the `Package Manager` window and select the `UI Effect` package in the package list and click the `TextMeshPro Support > Import` button.
|
||||||
⚠️ If you are using `Unity 2023.2/6000.0+` or `TextMeshPro 3.2/4.0+`, click the `TextMeshPro Support (Unity 6) > Import` button instead.
|
⚠️ If you are using `Unity 2023.2/6000.0+` or `TextMeshPro 3.2/4.0+`, click the `TextMeshPro Support (Unity 6) > Import` button instead.
|
||||||

|
|
||||||
|
|
||||||
3. The assets will be imported under `Assets/Samples/UI Effect/{version}`.
|
3. The assets will be imported under `Assets/Samples/UI Effect/{version}`.
|
||||||
|
|
||||||
4. Add the `UIEffect` component to a TextMeshProUGUI element and adjust the effect settings. The `<font>` and `<sprite>` tags are also supported.
|
4. Add the `UIEffect` component to a TextMeshProUGUI element and adjust the effect settings. The `<font>` and `<sprite>` tags are also supported.
|
||||||

|

|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> `TextMeshPro Support` may change with updates to the UIEffect package.
|
> `TextMeshPro Support` may change with updates to the UIEffect package.
|
||||||
@@ -462,19 +474,38 @@ Alternatively, you can manually import the resources by following these steps:
|
|||||||
|
|
||||||
### Usage with SoftMaskForUGUI
|
### Usage with SoftMaskForUGUI
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
[SoftMaskForUGUI](https://github.com/mob-sakai/SoftMaskForUGUI) is a package that allows you to create soft masks for UI elements.
|
[SoftMaskForUGUI](https://github.com/mob-sakai/SoftMaskForUGUI) is a package that allows you to create soft masks for UI elements.
|
||||||
|
|
||||||
`SoftMaskForUGUI (v3.3.0+)` supports `UIEffect (v5.6.0+)`.
|
`SoftMaskForUGUI (v3.3.0+)` supports `UIEffect (v5.7.0+)`.
|
||||||
When a shader included in the samples is requested, an import dialog will automatically appear.
|
When a shader included in the samples is requested, an import dialog will automatically appear.
|
||||||
Click the `Import` button.
|
Click the `Import` button.
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
|
### Usage with ShaderGraph
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
To use UIEffect with ShaderGraph, you need to import additional resources.
|
||||||
|
|
||||||
|
1. Open the `Package Manager` window and select the `UI Effect` package in the package list and click the `ShaderGraph Support (Unity6, BuiltIn) > Import` button.
|
||||||
|
⚠️ If you are using Universal Render Pipeline (URP), click the `ShaderGraph Support (Unity6, URP) > Import` button.
|
||||||
|
|
||||||
|
2. The assets will be imported under `Assets/Samples/UI Effect/{version}`.
|
||||||
|
|
||||||
|
3. Change the sub target (Material) of the existing ShaderGraph file to `Canvas (UIEffect)`.
|
||||||
|
Alternatively, create a new ShaderGraph from `Assets/Create/Shader Graph/BuiltIn/Canvas Shader Graph (UIEffect)`.
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> Use `(UIEffect)` in the shader name or register as an optional shader in [ProjectSettings](#project-settings).
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
### Runtime/Editor Preset for UIEffect
|
### Runtime/Editor Preset for UIEffect
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
You can create and use presets for `UIEffect` components.
|
You can create and use presets for `UIEffect` components.
|
||||||
|
|
||||||
@@ -497,7 +528,7 @@ You can control the effect settings and animations via code.
|
|||||||
```csharp
|
```csharp
|
||||||
var effect = graphic.AddComponent<UIEffect>();
|
var effect = graphic.AddComponent<UIEffect>();
|
||||||
|
|
||||||
// Apply a preset
|
// Apply a runtime preset
|
||||||
effect.LoadPreset("Dissolve");
|
effect.LoadPreset("Dissolve");
|
||||||
|
|
||||||
// Set the effect parameters
|
// Set the effect parameters
|
||||||
@@ -517,7 +548,7 @@ UIEffectProjectSettings.shaderVariantCollection.WarmUp();
|
|||||||
|
|
||||||
### Project Settings
|
### Project Settings
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
You can adjust the project-wide settings for UIEffect. (`Edit > Project Settings > UI > UIEffect`)
|
You can adjust the project-wide settings for UIEffect. (`Edit > Project Settings > UI > UIEffect`)
|
||||||
|
|
||||||
@@ -595,7 +626,6 @@ Your support allows me to dedicate more time to development. 😊
|
|||||||
## License
|
## License
|
||||||
|
|
||||||
* MIT
|
* MIT
|
||||||
* © UTJ/UCL
|
|
||||||
|
|
||||||
## Author
|
## Author
|
||||||
|
|
||||||
@@ -606,4 +636,4 @@ Your support allows me to dedicate more time to development. 😊
|
|||||||
* GitHub page : https://github.com/mob-sakai/UIEffect
|
* GitHub page : https://github.com/mob-sakai/UIEffect
|
||||||
* Releases : https://github.com/mob-sakai/UIEffect/releases
|
* Releases : https://github.com/mob-sakai/UIEffect/releases
|
||||||
* Issue tracker : https://github.com/mob-sakai/UIEffect/issues
|
* Issue tracker : https://github.com/mob-sakai/UIEffect/issues
|
||||||
* Change log : https://github.com/mob-sakai/UIEffect/blob/main/Packages/src/CHANGELOG.md
|
* Change log : https://github.com/mob-sakai/UIEffect/blob/main/Packages/src/CHANGELOG.md
|
||||||
Reference in New Issue
Block a user