Class URPDefaultVolumeProfileSettings
A Graphics Settings container for the default Unity
Inherited Members
Namespace: UnityEngine .Rendering.Universal
Assembly: Unity.RenderPipelines.Universal.Runtime.dll
Syntax
[Serializable]
[SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))]
[CategoryInfo(Name = "Volume", Order = 0)]
public class URPDefaultVolumeProfileSettings : IDefaultVolumeProfileSettings, IRenderPipelineGraphicsSettings
Remarks
To change those settings, go to Editor > Project Settings in the Graphics tab (URP). Changing this through the API is only allowed in the Editor. In the Player, this raises an error.
Examples
This example demonstrates how to get the default volume profile used by URP.
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
public static class URPDefaultVolumeProfileHelper
{
public static VolumeProfile volumeProfile
{
get
{
var gs = GraphicsSettings.GetRenderPipelineSettings<URPDefaultVolumeProfileSettings>();
if (gs == null) //not in URP
return null;
return gs.volumeProfile;
}
}
}
Properties
version
Gets the current version of the volume profile settings.
Declaration
public int version { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
The version number tracks the changes made to the settings over time. It can be used to handle migration of older settings in the future when updates are made to the system.
Examples
// Get the current version of the volume profile settings
int currentVersion = GraphicsSettings.GetRenderPipelineSettings<URPDefaultVolumeProfileSettings>().version;
See Also
volumeProfile
Gets or sets the default volume profile asset.
Declaration
public VolumeProfile volumeProfile { get; set; }
Property Value
Type | Description |
---|---|
Volume |
Remarks
This property allows you to configure the default volume profile used by the Volume Framework. Setting this property will automatically update the volume profile used by the system.
Examples
// Set the default volume profile to a new profile
var urpDefaultVolumeProfileSettings = GraphicsSettings.GetRenderPipelineSettings<URPDefaultVolumeProfileSettings>();
urpDefaultVolumeProfileSettings.volumeProfile = newVolumeProfile;