跳至主要内容

Class BlurFilter

A blur filter for uGUI components

Assembly: ChocDino.UIFX.dll
Declaration
[ExecuteInEditMode]
[RequireComponent(typeof(Graphic))]
[HelpURL("https://www.chocdino.com/products/unity-assets/")]
[AddComponentMenu("UI/Chocolate Dinosaur UIFX/Filters/UIFX - Blur Filter")]
public class BlurFilter : UIBehaviour, IMaterialModifier, IMeshModifier

Inheritance: System.Object -> UnityEngine.Object -> UnityEngine.Component -> UnityEngine.Behaviour -> UnityEngine.MonoBehaviour -> UnityEngine.EventSystems.UIBehaviour

Implements:
UnityEngine.UI.IMaterialModifier, UnityEngine.UI.IMeshModifier

Properties

BlurAxes2D

Which axes to blur

Declaration
public BlurAxes2D BlurAxes2D { get; set; }

Blur

The maximum size of the blur kernel as a fraction of the diagonal length. So 0.01 would be a kernel with pixel dimensions of 1% of the diagonal length.

Declaration
public float Blur { get; set; }

ApplyAlphaCurve

Toggle the use of the alpha curve to fade to transparent as blur Strength increases

Declaration
public bool ApplyAlphaCurve { get; set; }

AlphaCurve

An optional curve to allow the Graphic to fade to transparent as the blur Strength property increases

Declaration
public AnimationCurve AlphaCurve { get; set; }

Strength

How much of the maximum blur effect to apply. Range [0..1] Default is 1.0

Declaration
public float Strength { get; set; }

Fields

GlobalStrength

A global scale for Strength which can be useful to easily adjust Strength across all instances of BlurFilter. Range [0..1] Default is 1.0

Declaration
public static float GlobalStrength

Implements

  • UnityEngine.UI.IMaterialModifier
  • UnityEngine.UI.IMeshModifier