Class FilterStack
Provides methods for handling individual Filter within a FilterStack.
Inherited Members
Namespace: UnityEditor.TerrainTools
Syntax
[Serializable]
public class FilterStack : ScriptableObject
Fields
filters
The System.Collections.Generic.List`1 that contains all the Filters for this FilterStack.
Declaration
[SerializeField]
public List<Filter> filters
Field Value
Type | Description |
---|---|
List<Filter> |
Properties
hasEnabledFilters
Checks if the filters are enabled.
Declaration
public bool hasEnabledFilters { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Add(Filter)
Adds a Filter reference to the end of the FilterStack list of Filters.
Declaration
public void Add(Filter filter)
Parameters
Type | Name | Description |
---|---|---|
Filter | filter | The Filter reference to add. |
Clear(Boolean)
Removes all Filters.
Declaration
public void Clear(bool destroy = false)
Parameters
Type | Name | Description |
---|---|---|
Boolean | destroy | When the value is true, the filters will be destroyed. |
Eval(FilterContext, RenderTexture, RenderTexture)
Evaluates the FilterStack. Composited result will be copied into fc.destinationRenderTexture.
Declaration
public void Eval(FilterContext fc, RenderTexture source, RenderTexture dest)
Parameters
Type | Name | Description |
---|---|---|
FilterContext | fc | The FilterContext that should be used for composition. |
UnityEngine.RenderTexture | source | The source render texture to blit from. |
UnityEngine.RenderTexture | dest | The destination render texture for blitting to. |
Insert(Int32, Filter)
Inserts the specified Filter at the specified index.
Declaration
public void Insert(int index, Filter filter)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The index at which the Filter reference should be inserted. |
Filter | filter | The Filter reference to insert. |
Remove(Filter)
Removes the specified Filter.
Declaration
public bool Remove(Filter filter)
Parameters
Type | Name | Description |
---|---|---|
Filter | filter | The Filter reference to remove. |
Returns
Type | Description |
---|---|
Boolean | Returns true if the specified Filter was found and removed; otherwise, returns false. |
RemoveAt(Int32)
Removes the Filter at the specified index.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The index of the Filter to be removed. |