namespace UnityEngine.Rendering.Universal
{
///
/// Volume debug settings.
///
public partial class UniversalRenderPipelineVolumeDebugSettings : VolumeDebugSettings
{
/// Selected camera volume stack.
public override VolumeStack selectedCameraVolumeStack
{
get
{
Camera cam = selectedCamera;
if (cam == null)
return null;
var additionalCameraData = selectedCamera.GetComponent();
if (additionalCameraData == null)
return null;
var stack = additionalCameraData.volumeStack;
if (stack != null)
return stack;
return VolumeManager.instance.stack;
}
}
/// Selected camera volume layer mask.
public override LayerMask selectedCameraLayerMask
{
get
{
if (selectedCamera != null && selectedCamera.TryGetComponent(out var selectedAdditionalCameraData))
return selectedAdditionalCameraData.volumeLayerMask;
return 1; // "Default"
}
}
/// Selected camera volume position.
public override Vector3 selectedCameraPosition => selectedCamera != null ? selectedCamera.transform.position : Vector3.zero;
}
}