Class VolumeParameter<T>
A generic implementation of Volume
Inherited Members
Namespace: UnityEngine .Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
[Serializable]
public class VolumeParameter<T> : VolumeParameter, ICloneable, IEquatable<VolumeParameter<T>>
Type Parameters
Name | Description |
---|---|
T | The type of value to hold in this parameter. |
Remarks
T
should a serializable type.
Due to limitations with the serialization system in Unity, you should not use this class
directly to declare parameters in a Volume
Examples
This sample code shows how to make a custom parameter holding a float
:
using UnityEngine.Rendering;
[Serializable]
public sealed class MyFloatParameter : VolumeParameter<float>
{
public MyFloatParameter(float value, bool overrideState = false)
: base(value, overrideState) { }
public sealed override void Interp(float from, float to, float t)
{
m_Value = from + (to - from) * t;
}
}
Constructors
Name | Description |
---|---|
Volume |
Creates a new Volume |
Volume |
Creates a new Volume |
Fields
Name | Description |
---|---|
m_Value | The value stored and serialized by this parameter. |
Properties
Name | Description |
---|---|
value | The value that this parameter stores. |
Methods
Name | Description |
---|---|
Clone() | Clones the current instance of the Volume |
Equals(object) | Determines whether two object instances are equal. |
Equals(Volume |
Checks if this parameter is equal to another. |
Get |
Returns a hash code for the current object. |
Interp(T, T, float) | Interpolates two values using a factor |
Override(T) | Sets the value for this parameter and sets its override state to |
Set |
Sets the value of this parameter to the value in |
To |
Returns a string that represents the current object. |
Operators
Name | Description |
---|---|
operator ==(Volume |
Compares the value in a parameter with another value of the same type. |
explicit operator T(Volume |
Explicitly downcast a Volume |
operator !=(Volume |
Compares the value store in a parameter with another value of the same type. |