Class VolumeProfile
An Asset which holds a set of settings to use with a Volume.
Inherited Members
Namespace: UnityEngine.Rendering
Syntax
[HelpURL("https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@10.4/manual/Volume-Profile.html")]
public sealed class VolumeProfile : ScriptableObject
Fields
components
A list of every setting that this Volume Profile stores.
Declaration
public List<VolumeComponent> components
Field Value
Type | Description |
---|---|
List<VolumeComponent> |
isDirty
A dirty check used to redraw the profile inspector when something has changed. This is currently only used in the editor.
Declaration
[NonSerialized]
public bool isDirty
Field Value
Type | Description |
---|---|
Boolean |
Methods
Add(Type, Boolean)
Adds a VolumeComponent to this Volume Profile.
Declaration
public VolumeComponent Add(Type type, bool overrides = false)
Parameters
Type | Name | Description |
---|---|---|
Type | type | A type that inherits from VolumeComponent. |
Boolean | overrides | Specifies whether Unity should automatically override all the settings when you add a VolumeComponent to the Volume Profile. |
Returns
Type | Description |
---|---|
VolumeComponent | The instance created for the given type that has been added to the profile |
Remarks
You can only have a single component of the same type per Volume Profile.
Add<T>(Boolean)
Adds a VolumeComponent to this Volume Profile.
Declaration
public T Add<T>(bool overrides = false)
where T : VolumeComponent
Parameters
Type | Name | Description |
---|---|---|
Boolean | overrides | Specifies whether Unity should automatically override all the settings when you add a VolumeComponent to the Volume Profile. |
Returns
Type | Description |
---|---|
T | The instance for the given type that you added to the Volume Profile |
Type Parameters
Name | Description |
---|---|
T | A type of VolumeComponent. |
Remarks
You can only have a single component of the same type per Volume Profile.
See Also
GetHashCode()
A custom hashing function that Unity uses to compare the state of parameters.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A computed hash code for the current instance. |
Overrides
Has(Type)
Checks if this Volume Profile contains the VolumeComponent you pass in.
Declaration
public bool Has(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | A type that inherits from VolumeComponent. |
Returns
Type | Description |
---|---|
Boolean |
|
See Also
Has<T>()
Checks if this Volume Profile contains the VolumeComponent you pass in.
Declaration
public bool Has<T>()
where T : VolumeComponent
Returns
Type | Description |
---|---|
Boolean |
|
Type Parameters
Name | Description |
---|---|
T | A type of VolumeComponent. |
See Also
HasSubclassOf(Type)
Checks if this Volume Profile contains the VolumeComponent, which is a subclass of type
,
that you pass in.
Declaration
public bool HasSubclassOf(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | A type that inherits from VolumeComponent. |
Returns
Type | Description |
---|---|
Boolean |
|
See Also
Remove(Type)
Removes a VolumeComponent from this Volume Profile.
Declaration
public void Remove(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | A type that inherits from VolumeComponent. |
Remarks
This method does nothing if the type does not exist in the Volume Profile.
See Also
Remove<T>()
Removes a VolumeComponent from this Volume Profile.
Declaration
public void Remove<T>()
where T : VolumeComponent
Type Parameters
Name | Description |
---|---|
T | A type of VolumeComponent. |
Remarks
This method does nothing if the type does not exist in the Volume Profile.
See Also
Reset()
Resets the dirty state of the Volume Profile. Unity uses this to force-refresh and redraw the Volume Profile editor when you modify the Asset via script instead of the Inspector.
Declaration
public void Reset()
TryGet<T>(out T)
Gets the VolumeComponent of the specified type, if it exists.
Declaration
public bool TryGet<T>(out T component)
where T : VolumeComponent
Parameters
Type | Name | Description |
---|---|---|
T | component | The output argument that contains the VolumeComponent
or |
Returns
Type | Description |
---|---|
Boolean |
|
Type Parameters
Name | Description |
---|---|
T | A type of VolumeComponent. |
See Also
TryGet<T>(Type, out T)
Gets the VolumeComponent of the specified type, if it exists.
Declaration
public bool TryGet<T>(Type type, out T component)
where T : VolumeComponent
Parameters
Type | Name | Description |
---|---|---|
Type | type | A type that inherits from VolumeComponent. |
T | component | The output argument that contains the VolumeComponent
or |
Returns
Type | Description |
---|---|
Boolean |
|
Type Parameters
Name | Description |
---|---|
T | A type of VolumeComponent |
See Also
TryGetAllSubclassOf<T>(Type, List<T>)
Gets all the VolumeComponent that are subclasses of the specified type, if there are any.
Declaration
public bool TryGetAllSubclassOf<T>(Type type, List<T> result)
where T : VolumeComponent
Parameters
Type | Name | Description |
---|---|---|
Type | type | A type that inherits from VolumeComponent. |
List<T> | result | The output list that contains all the VolumeComponent if any. Note that Unity does not clear this list. |
Returns
Type | Description |
---|---|
Boolean |
|
Type Parameters
Name | Description |
---|---|
T | A type of VolumeComponent. |
See Also
TryGetSubclassOf<T>(Type, out T)
Gets the VolumeComponent, which is a subclass of type
, if
it exists.
Declaration
public bool TryGetSubclassOf<T>(Type type, out T component)
where T : VolumeComponent
Parameters
Type | Name | Description |
---|---|---|
Type | type | A type that inherits from VolumeComponent. |
T | component | The output argument that contains the VolumeComponent
or |
Returns
Type | Description |
---|---|
Boolean |
|
Type Parameters
Name | Description |
---|---|
T | A type of VolumeComponent. |