docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class HDProbe

    Base class for reflection like probes.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    HDProbe
    HDAdditionalReflectionData
    PlanarReflectionProbe
    Implements
    IVersionable<HDProbe.Version>
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    MonoBehaviour.CancelInvoke(string)
    MonoBehaviour.IsInvoking(string)
    MonoBehaviour.StartCoroutine(string)
    MonoBehaviour.StartCoroutine(string, object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(string)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(object)
    MonoBehaviour.destroyCancellationToken
    MonoBehaviour.useGUILayout
    MonoBehaviour.didStart
    MonoBehaviour.didAwake
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, bool)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>(bool)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.GetComponentIndex()
    Component.CompareTag(string)
    Component.CompareTag(TagHandle)
    Component.SendMessageUpwards(string, object, SendMessageOptions)
    Component.SendMessageUpwards(string, object)
    Component.SendMessageUpwards(string)
    Component.SendMessageUpwards(string, SendMessageOptions)
    Component.SendMessage(string, object)
    Component.SendMessage(string)
    Component.SendMessage(string, object, SendMessageOptions)
    Component.SendMessage(string, SendMessageOptions)
    Component.BroadcastMessage(string, object, SendMessageOptions)
    Component.BroadcastMessage(string, object)
    Component.BroadcastMessage(string)
    Component.BroadcastMessage(string, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Rendering.HighDefinition
    Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
    Syntax
    [ExecuteAlways]
    public abstract class HDProbe : MonoBehaviour, IVersionable<HDProbe.Version>

    Fields

    k_Migration

    The migration steps for HDProbes

    Declaration
    protected static readonly MigrationDescription<HDProbe.Version, HDProbe> k_Migration
    Field Value
    Type Description
    MigrationDescription<HDProbe.Version, HDProbe>

    m_ObsoleteInfiniteProjection

    Obsolete field

    Declaration
    [SerializeField]
    [FormerlySerializedAs("m_InfiniteProjection")]
    [Obsolete("For Data Migration")]
    protected bool m_ObsoleteInfiniteProjection
    Field Value
    Type Description
    bool

    m_ObsoleteInfluenceVolume

    Obsolete field

    Declaration
    [SerializeField]
    [FormerlySerializedAs("m_InfluenceVolume")]
    [Obsolete("For Data Migration")]
    protected InfluenceVolume m_ObsoleteInfluenceVolume
    Field Value
    Type Description
    InfluenceVolume

    m_ObsoleteMode

    Obsolete field

    Declaration
    [SerializeField]
    [FormerlySerializedAs("m_Mode")]
    [Obsolete("For Data Migration")]
    protected ProbeSettings.Mode m_ObsoleteMode
    Field Value
    Type Description
    ProbeSettings.Mode

    m_ObsoleteMultiplier

    Obsolete field

    Declaration
    [SerializeField]
    [FormerlySerializedAs("m_Multiplier")]
    [FormerlySerializedAs("dimmer")]
    [FormerlySerializedAs("m_Dimmer")]
    [FormerlySerializedAs("multiplier")]
    [Obsolete("For Data Migration")]
    protected float m_ObsoleteMultiplier
    Field Value
    Type Description
    float

    m_ObsoleteWeight

    Obsolete field

    Declaration
    [SerializeField]
    [FormerlySerializedAs("m_Weight")]
    [FormerlySerializedAs("weight")]
    [Obsolete("For Data Migration")]
    [Range(0, 1)]
    protected float m_ObsoleteWeight
    Field Value
    Type Description
    float

    m_ProbeSettings

    Backed values of the probe settings. Don't use directly this except for migration code.

    Declaration
    [SerializeField]
    protected ProbeSettings m_ProbeSettings
    Field Value
    Type Description
    ProbeSettings

    Properties

    ExposureControlEnabled

    Set and used by the pipeline, depending on the resolved configuration of a probe.

    Declaration
    public bool ExposureControlEnabled { get; set; }
    Property Value
    Type Description
    bool

    bakedRenderData

    The render data of the last bake

    Declaration
    public HDProbe.RenderData bakedRenderData { get; set; }
    Property Value
    Type Description
    HDProbe.RenderData

    bakedTexture

    The baked texture. Can be null if the probe was never baked.

    Most of the time, you do not need to set this value yourself. You can set this property in situations where you want to manually assign data that differs from what Unity generates.

    Declaration
    public Texture bakedTexture { get; set; }
    Property Value
    Type Description
    Texture

    boundingSphere

    The bounding sphere of the influence

    Declaration
    public BoundingSphere boundingSphere { get; }
    Property Value
    Type Description
    BoundingSphere

    bounds

    The bounding box of the influence

    Declaration
    public Bounds bounds { get; }
    Property Value
    Type Description
    Bounds

    cubeResolution

    Resolution of the cube probe.

    Declaration
    public CubeReflectionResolution cubeResolution { get; }
    Property Value
    Type Description
    CubeReflectionResolution

    customRenderData

    The render data of the custom mode

    Declaration
    public HDProbe.RenderData customRenderData { get; set; }
    Property Value
    Type Description
    HDProbe.RenderData

    customTexture

    Texture used in custom mode.

    Declaration
    public Texture customTexture { get; set; }
    Property Value
    Type Description
    Texture

    fadeDistance

    The distance at which reflections smoothly fade out before HDRP cut them completely.

    Declaration
    public float fadeDistance { get; set; }
    Property Value
    Type Description
    float

    frameSettings

    Frame settings in use with this probe.

    Declaration
    public ref FrameSettings frameSettings { get; }
    Property Value
    Type Description
    FrameSettings

    frameSettingsOverrideMask

    Specify the settings overriden for the frame settins

    Declaration
    public ref FrameSettingsOverrideMask frameSettingsOverrideMask { get; }
    Property Value
    Type Description
    FrameSettingsOverrideMask

    importance

    Importance value for sorting the probes (higher values display over lower ones).

    Declaration
    public int importance { get; set; }
    Property Value
    Type Description
    int

    influenceVolume

    InfluenceVolume of the probe.

    Declaration
    public InfluenceVolume influenceVolume { get; }
    Property Value
    Type Description
    InfluenceVolume

    isProjectionInfinite

    Is the projection at infinite? Value could be changed by Proxy mode.

    Declaration
    public bool isProjectionInfinite { get; }
    Property Value
    Type Description
    bool

    lightLayers

    Light layer to use by this probe.

    Declaration
    public RenderingLayerMask lightLayers { get; set; }
    Property Value
    Type Description
    RenderingLayerMask

    lightLayersAsUInt

    This function return a mask of light layers as uint and handle the case of Everything as being 0xFF and not -1

    Declaration
    public uint lightLayersAsUInt { get; }
    Property Value
    Type Description
    uint

    mode

    The capture mode.

    Declaration
    public ProbeSettings.Mode mode { get; set; }
    Property Value
    Type Description
    ProbeSettings.Mode

    multiplier

    Multiplier factor of reflection (non PBR parameter).

    Declaration
    public float multiplier { get; set; }
    Property Value
    Type Description
    float

    proxyExtents

    The extents of the proxy volume

    Declaration
    public Vector3 proxyExtents { get; }
    Property Value
    Type Description
    Vector3

    proxyVolume

    ProxyVolume currently used by this probe.

    Declaration
    public ReflectionProxyVolumeComponent proxyVolume { get; set; }
    Property Value
    Type Description
    ReflectionProxyVolumeComponent

    rangeCompressionFactor

    The result of the rendering of the probe will be divided by this factor. When the probe is read, this factor is undone as the probe data is read. This is to simply avoid issues with values clamping due to precision of the storing format.

    Declaration
    public float rangeCompressionFactor { get; set; }
    Property Value
    Type Description
    float

    realtimeDepthTexture

    The allocated realtime depth texture. Can be null if the probe never rendered with the realtime mode.

    Most of the time, you do not need to set this value yourself. You can set this property in situations where you want to manually assign data that differs from what Unity generates.

    Declaration
    public RenderTexture realtimeDepthTexture { get; set; }
    Property Value
    Type Description
    RenderTexture

    realtimeDepthTextureRTH

    Returns an RThandle reference to the realtime texture where the depth result of the probe is stored.

    Declaration
    public RTHandle realtimeDepthTextureRTH { get; }
    Property Value
    Type Description
    RTHandle

    realtimeMode

    The realtime mode of the probe

    Declaration
    public ProbeSettings.RealtimeMode realtimeMode { get; set; }
    Property Value
    Type Description
    ProbeSettings.RealtimeMode

    realtimeRenderData

    The render data of the last realtime rendering

    Declaration
    public HDProbe.RenderData realtimeRenderData { get; set; }
    Property Value
    Type Description
    HDProbe.RenderData

    realtimeTexture

    The allocated realtime texture. Can be null if the probe never rendered with the realtime mode.

    Most of the time, you do not need to set this value yourself. You can set this property in situations where you want to manually assign data that differs from what Unity generates.

    Declaration
    public RenderTexture realtimeTexture { get; set; }
    Property Value
    Type Description
    RenderTexture

    realtimeTextureRTH

    Returns an RThandle reference to the realtime texture where the color result of the probe is stored.

    Declaration
    public RTHandle realtimeTextureRTH { get; }
    Property Value
    Type Description
    RTHandle

    renderData

    The currently used render data.

    Declaration
    public HDProbe.RenderData renderData { get; }
    Property Value
    Type Description
    HDProbe.RenderData

    resolution

    Resolution of the planar probe.

    Declaration
    public PlanarReflectionAtlasResolution resolution { get; }
    Property Value
    Type Description
    PlanarReflectionAtlasResolution

    settings

    Use this property to get the settings used for calculations.

    To edit the settings of the probe, use the unsanitized version of this property: settingsRaw.

    Declaration
    public ProbeSettings settings { get; }
    Property Value
    Type Description
    ProbeSettings

    settingsRaw

    To read the settings of this probe, most of the time you should use the sanitized version of this property: settings. Use this property to read the settings of the probe only when it is important that you read the raw data.

    Declaration
    public ref ProbeSettings settingsRaw { get; }
    Property Value
    Type Description
    ProbeSettings

    texture

    The texture used during lighting for this probe.

    Declaration
    public Texture texture { get; }
    Property Value
    Type Description
    Texture

    timeSlicing

    Whether the realtime probe uses time slicing

    Declaration
    public bool timeSlicing { get; set; }
    Property Value
    Type Description
    bool

    type

    The probe type

    Declaration
    public ProbeSettings.ProbeType type { get; protected set; }
    Property Value
    Type Description
    ProbeSettings.ProbeType

    useInfluenceVolumeAsProxyVolume

    Use the influence volume as the proxy volume if this is true.

    Declaration
    public bool useInfluenceVolumeAsProxyVolume { get; }
    Property Value
    Type Description
    bool

    weight

    Weight for blending amongst probes (non PBR parameter).

    Declaration
    public float weight { get; set; }
    Property Value
    Type Description
    float

    Methods

    GetRenderData(Mode)

    Get the render data of a specific mode.

    Note: The HDProbe stores only one RenderData per mode, even for view dependent probes with multiple viewers. In that case, make sure that you have set the RenderData relative to the expected viewer before rendering. Otherwise the data retrieved by this function will be wrong.

    Declaration
    public HDProbe.RenderData GetRenderData(ProbeSettings.Mode targetMode)
    Parameters
    Type Name Description
    ProbeSettings.Mode targetMode

    The mode to query

    Returns
    Type Description
    HDProbe.RenderData

    The requested render data

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    When the mode is invalid

    GetTexture(Mode)

    Get the texture for a specific mode.

    Declaration
    public Texture GetTexture(ProbeSettings.Mode targetMode)
    Parameters
    Type Name Description
    ProbeSettings.Mode targetMode

    The mode to query.

    Returns
    Type Description
    Texture

    The texture for this specified mode.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    When thetargetMode is invalid.

    IsTurnedOff()

    Checks weather the current probe is set to off.

    Declaration
    public bool IsTurnedOff()
    Returns
    Type Description
    bool

    Returns true if the the selected probe has its resolution set to off.

    PrepareCulling()

    Prepare the probe for culling. You should call this method when you update the influenceVolume parameters during runtime.

    Declaration
    public virtual void PrepareCulling()

    RequestRenderNextUpdate()

    Requests that Unity renders this Reflection Probe during the next update.

    Declaration
    public void RequestRenderNextUpdate()
    Remarks

    If the Reflection Probe uses OnDemand mode, Unity renders the probe the next time the probe influences a Camera rendering.

    If the Reflection Probe doesn't have an attached HDAdditionalReflectionData component, calling this function has no effect.

    Note: If any part of a Camera's frustum intersects a Reflection Probe's influence volume, the Reflection Probe influences the Camera.

    SetDepthTexture(Mode, Texture)

    Set the depth texture for a specific target mode.

    Declaration
    public Texture SetDepthTexture(ProbeSettings.Mode targetMode, Texture texture)
    Parameters
    Type Name Description
    ProbeSettings.Mode targetMode

    The mode to update.

    Texture texture

    The texture to set.

    Returns
    Type Description
    Texture

    The texture that was set.

    SetRenderData(Mode, RenderData)

    Set the render data for a specific mode.

    Note: The HDProbe stores only one RenderData per mode, even for view dependent probes with multiple viewers. In that case, make sure that you have set the RenderData relative to the expected viewer before rendering.

    Declaration
    public void SetRenderData(ProbeSettings.Mode targetMode, HDProbe.RenderData renderData)
    Parameters
    Type Name Description
    ProbeSettings.Mode targetMode

    The mode to update

    HDProbe.RenderData renderData

    The data to set

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    When the mode is invalid

    SetTexture(Mode, Texture)

    Set the texture for a specific target mode.

    Declaration
    public Texture SetTexture(ProbeSettings.Mode targetMode, Texture texture)
    Parameters
    Type Name Description
    ProbeSettings.Mode targetMode

    The mode to update.

    Texture texture

    The texture to set.

    Returns
    Type Description
    Texture

    The texture that was set.

    Exceptions
    Type Condition
    ArgumentException

    When the texture is invalid.

    ArgumentOutOfRangeException

    When the mode is invalid

    Implements

    IVersionable<TVersion>
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)