Skip to main content

Class FilterBase

Base class for all derived filter classes

Assembly: ChocDino.UIFX.dll
Declaration
[ExecuteInEditMode]
[RequireComponent(typeof(CanvasRenderer))]
[HelpURL("https://www.chocdino.com/products/unity-assets/")]
public abstract class FilterBase : UIBehaviour, IMaterialModifier, IMeshModifier

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

Derived:
ChocDino.UIFX.OutlineFilter

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

Properties

Strength

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

Declaration
public float Strength { get; set; }

Methods

ForceUpdate(bool)

Forces the filter to update. Usually this happens automatically, but in some cases you may want to force an update.

Declaration
public void ForceUpdate(bool force = false)
Parameters
TypeName
System.Booleanforce

ResolveToTexture()

Resolves to a final sRGB straight-alpha texture suitable for display or saving to image file.

Declaration
public RenderTexture ResolveToTexture()
Returns

UnityEngine.RenderTexture

SaveToPNG(string)

Resolve the filter output to a sRGB texture and write it to a PNG file

Declaration
public bool SaveToPNG(string path)
Returns

System.Boolean

Parameters
TypeName
System.Stringpath

Implements

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