Class VolumeProfile
An Asset which holds a set of settings to use with a Volume.
Inherited Members
Namespace: UnityEngine .Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
[CurrentPipelineHelpURL("Volume-Profile", "")]
[Icon("Packages/com.unity.render-pipelines.core/Editor/Icons/Processed/VolumeProfile Icon.asset")]
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<Volume |
isDirty
Note: For Internal Use Only
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 |
---|---|
bool |
Methods
Add(Type, bool)
Adds a Volume
Declaration
public VolumeComponent Add(Type type, bool overrides = false)
Parameters
Type | Name | Description |
---|---|---|
Type | type | A type that inherits from Volume |
bool | overrides | Specifies whether Unity should automatically override all the settings when
you add a Volume |
Returns
Type | Description |
---|---|
Volume |
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.
See Also
Add<T>(bool)
Adds a Volume
Declaration
public T Add<T>(bool overrides = false) where T : VolumeComponent
Parameters
Type | Name | Description |
---|---|---|
bool | overrides | Specifies whether Unity should automatically override all the settings when
you add a Volume |
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 Volume |
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 |
---|---|
int | A computed hash code for the current instance. |
Overrides
Has(Type)
Checks if this Volume Profile contains the Volume
Declaration
public bool Has(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | A type that inherits from Volume |
Returns
Type | Description |
---|---|
bool |
|
See Also
HasSubclassOf(Type)
Checks if this Volume Profile contains the Volumetype
,
that you pass in.
Declaration
public bool HasSubclassOf(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | A type that inherits from Volume |
Returns
Type | Description |
---|---|
bool |
|
See Also
Has<T>()
Checks if this Volume Profile contains the Volume
Declaration
public bool Has<T>() where T : VolumeComponent
Returns
Type | Description |
---|---|
bool |
|
Type Parameters
Name | Description |
---|---|
T | A type of Volume |
See Also
Remove(Type)
Removes a Volume
Declaration
public void Remove(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | A type that inherits from Volume |
Remarks
This method does nothing if the type does not exist in the Volume Profile.
See Also
Remove<T>()
Removes a Volume
Declaration
public void Remove<T>() where T : VolumeComponent
Type Parameters
Name | Description |
---|---|
T | A type of Volume |
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()
TryGetAllSubclassOf<T>(Type, List<T>)
Gets all the Volume
Declaration
public bool TryGetAllSubclassOf<T>(Type type, List<T> result) where T : VolumeComponent
Parameters
Type | Name | Description |
---|---|---|
Type | type | A type that inherits from Volume |
List<T> | result | The output list that contains all the Volume |
Returns
Type | Description |
---|---|
bool |
|
Type Parameters
Name | Description |
---|---|
T | A type of Volume |
See Also
TryGetSubclassOf<T>(Type, out T)
Gets the Volumetype
, 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 Volume |
T | component | The output argument that contains the Volume |
Returns
Type | Description |
---|---|
bool |
|
Type Parameters
Name | Description |
---|---|
T | A type of Volume |
See Also
TryGet<T>(Type, out T)
Gets the Volume
Declaration
public bool TryGet<T>(Type type, out T component) where T : VolumeComponent
Parameters
Type | Name | Description |
---|---|---|
Type | type | A type that inherits from Volume |
T | component | The output argument that contains the Volume |
Returns
Type | Description |
---|---|
bool |
|
Type Parameters
Name | Description |
---|---|
T | A type of Volume |
See Also
TryGet<T>(out T)
Gets the Volume
Declaration
public bool TryGet<T>(out T component) where T : VolumeComponent
Parameters
Type | Name | Description |
---|---|---|
T | component | The output argument that contains the Volume |
Returns
Type | Description |
---|---|
bool |
|
Type Parameters
Name | Description |
---|---|
T | A type of Volume |