Class Volume
A generic Volume component holding a VolumeProfile.
Inherited Members
Namespace: UnityEngine.Rendering
Syntax
[HelpURL("https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@10.2/manual/Volumes.html")]
[ExecuteAlways]
[AddComponentMenu("Miscellaneous/Volume")]
public class Volume : MonoBehaviour
Fields
blendDistance
The outer distance to start blending from. A value of 0 means no blending and Unity applies the Volume overrides immediately upon entry.
Declaration
[Tooltip("Sets the outer distance to start blending from. A value of 0 means no blending and Unity applies the Volume overrides immediately upon entry.")]
public float blendDistance
Field Value
| Type | Description |
|---|---|
| Single |
isGlobal
Specifies whether to apply the Volume to the entire Scene or not.
Declaration
[Tooltip("When enabled, HDRP applies this Volume to the entire Scene.")]
public bool isGlobal
Field Value
| Type | Description |
|---|---|
| Boolean |
priority
The Volume priority in the stack. A higher value means higher priority. This supports negative values.
Declaration
[Tooltip("Sets the Volume priority in the stack. A higher value means higher priority. You can use negative values.")]
public float priority
Field Value
| Type | Description |
|---|---|
| Single |
sharedProfile
The shared Profile that this Volume uses.
Modifying sharedProfile changes every Volumes that uses this Profile and also changes
the Profile settings stored in the Project.
Declaration
public VolumeProfile sharedProfile
Field Value
| Type | Description |
|---|---|
| VolumeProfile |
Remarks
You should not modify Profiles that sharedProfile returns. If you want
to modify the Profile of a Volume, use profile instead.
See Also
weight
The total weight of this volume in the Scene. 0 means no effect and 1 means full effect.
Declaration
[Range(0F, 1F)]
[Tooltip("Sets the total weight of this Volume in the Scene. 0 means no effect and 1 means full effect.")]
public float weight
Field Value
| Type | Description |
|---|---|
| Single |
Properties
profile
Gets the first instantiated VolumeProfile assigned to the Volume.
Modifying profile changes the Profile for this Volume only. If another Volume
uses the same Profile, this clones the shared Profile and starts using it from now on.
Declaration
public VolumeProfile profile { get; set; }
Property Value
| Type | Description |
|---|---|
| VolumeProfile |
Remarks
This property automatically instantiates the Profile and make it unique to this Volume so you can safely edit it via scripting at runtime without changing the original Asset in the Project. Note that if you pass your own Profile, you must destroy it when you finish using it.
See Also
Methods
HasInstantiatedProfile()
Checks if the Volume has an instantiated Profile or if it uses a shared Profile.
Declaration
public bool HasInstantiatedProfile()
Returns
| Type | Description |
|---|---|
| Boolean |
|