Class FilterStack
Provides methods for handling individual Filter within a FilterStack.
Inherited Members
Namespace: UnityEditor.TerrainTools
Assembly: Unity.TerrainTools.Editor.dll
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 | 
|---|---|
| bool | 
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(bool)
Removes all Filters.
Declaration
public void Clear(bool destroy = false)
  Parameters
| Type | Name | Description | 
|---|---|---|
| bool | 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.  | 
      
| RenderTexture | source | The source render texture to blit from.  | 
      
| RenderTexture | dest | The destination render texture for blitting to.  | 
      
Insert(int, Filter)
Inserts the specified Filter at the specified index.
Declaration
public void Insert(int index, Filter filter)
  Parameters
| Type | Name | Description | 
|---|---|---|
| int | 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 | 
|---|---|
| bool | Returns true if the specified Filter was found and removed; otherwise, returns false.  | 
      
RemoveAt(int)
Removes the Filter at the specified index.
Declaration
public void RemoveAt(int index)
  Parameters
| Type | Name | Description | 
|---|---|---|
| int | index | The index of the Filter to be removed.  |