Class PropertySheetFactory
A PropertySheet factory for easy creation and destruction of
Inheritance
Inherited Members
Namespace: UnityEngine.Rendering.PostProcessing
Syntax
public sealed class PropertySheetFactory
Constructors
PropertySheetFactory()
Creates a new factory.
Declaration
public PropertySheetFactory()
Methods
Get(Shader)
Gets a PropertySheet for a given shader instance. Sheets are recycled so you can safely call this method on every frame.
Declaration
public PropertySheet Get(Shader shader)
Parameters
Type | Name | Description |
---|---|---|
Shader | shader | A shader instance to retrieve a sheet for |
Returns
Type | Description |
---|---|
PropertySheet | A sheet for the given shader |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown if the shader is invalid |
Get(String)
Gets a PropertySheet for a given shader identifier. Sheets are recycled so you can safely call this method on every frame.
Declaration
[Obsolete("Use PropertySheet.Get(Shader) with a direct reference to the Shader instead.")]
public PropertySheet Get(string shaderName)
Parameters
Type | Name | Description |
---|---|---|
System.String | shaderName | The name of the shader to retrieve a sheet for |
Returns
Type | Description |
---|---|
PropertySheet | A sheet for the given shader |
Remarks
This method will not work when loading post-processing from an asset bundle. For this reason it is recommended to use Get(Shader) instead.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown if the shader is invalid |
Release()
Releases all resources used by this factory.
Declaration
public void Release()
Remarks
You don't need to call this method when using the builtin factory from PostProcessRenderContext.