跳至主要内容

Class TrailEffectBase

Base class for TrailEffect

Assembly: ChocDino.UIFX.dll
Declaration
[RequireComponent(typeof(Graphic))]
[HelpURL("https://www.chocdino.com/products/uifx/")]
public abstract class TrailEffectBase : UIBehaviour, IMeshModifier

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

Derived:
ChocDino.UIFX.TrailEffect, ChocDino.UIFX.TrailEffectTMP

Implements:
UnityEngine.UI.IMeshModifier

Properties

LayerCount

The number of trail layers

Declaration
public int LayerCount { get; set; }

DampingFront

The rate at which the front of the trail catches up with the movement. Higher value results in a less laggy trail. Default value is 50, range is [0..250].

Declaration
public float DampingFront { get; set; }

DampingBack

The rate at which the back of the trail catches up with the movement. Higher value results in a less laggy trail. Default value is 50, range is [0..250].

Declaration
public float DampingBack { get; set; }

AlphaCurve

Optional curve to control transparency. Transparency can also be controlled by the gradient property, but having this secondary control is useful when the gradient is animated but you still want apply a static transparency falloff.

Declaration
public AnimationCurve AlphaCurve { get; set; }

VertexModifierSource

Which vertex modifiers affect are used to calculate the vertex modifier effect. TranformAndVertex is the most expensive.

Declaration
public VertexModifierSource VertexModifierSource { get; set; }

Gradient

The gradient colors used by the trail

Declaration
public Gradient Gradient { get; set; }

GradientOffset

The offset applied to the gradient. The gradient will wrap using mirrored repeating.

Declaration
public float GradientOffset { get; set; }

GradientScale

The scaling applied to the gradient. The gradient will wrap using mirrored repeating.

Declaration
public float GradientScale { get; set; }

GradientOffsetSpeed

The animation speed for the offset property of the gradient. Allows easy simple scrolling animation without scripting. Set to zero for no animation.

Declaration
public float GradientOffsetSpeed { get; set; }

ShowTrailOnly

Only show the trail, hide the original UI Graphic

Declaration
public bool ShowTrailOnly { get; set; }

BlendMode

Which color blending mode to use to mix the original vertex colors with the gradient colors

Declaration
public BlendMode BlendMode { get; set; }

StrengthMode

The mode to use for fading out the trail when strength is less than 1.0

Declaration
public TrailStrengthMode StrengthMode { get; set; }

Strength

The strength of the effect. Range [0..1]

Declaration
public float Strength { get; set; }

GraphicComponent

Declaration
protected Graphic GraphicComponent { get; }

IgnoreTimeScale

If Time scale is ignored then Time.unscaledDeltaTime will be used for updating animation

Declaration
public static bool IgnoreTimeScale { get; set; }

DeltaTime

Declaration
protected static float DeltaTime { get; }

Implements

  • UnityEngine.UI.IMeshModifier