docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AREnvironmentProbeManager

    This class creates, maintains, and destroys environment probe GameObject components as the XREnvironmentProbeSubsystem provides updates from environment probes as they are detected in the environment.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    SubsystemLifecycleManager<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider>
    ARTrackableManager<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider, XREnvironmentProbe, AREnvironmentProbe>
    AREnvironmentProbeManager
    Inherited Members
    ARTrackableManager<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider, XREnvironmentProbe, AREnvironmentProbe>.trackables
    ARTrackableManager<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider, XREnvironmentProbe, AREnvironmentProbe>.SetTrackablesActive(bool)
    SubsystemLifecycleManager<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider>.subsystem
    SubsystemLifecycleManager<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider>.descriptor
    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.useGUILayout
    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.CompareTag(string)
    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.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    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.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.ARFoundation
    Assembly: Unity.XR.ARFoundation.dll
    Syntax
    [DisallowMultipleComponent]
    [DefaultExecutionOrder(-2147483647)]
    [HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.AREnvironmentProbeManager.html")]
    public sealed class AREnvironmentProbeManager : ARTrackableManager<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider, XREnvironmentProbe, AREnvironmentProbe>

    Properties

    automaticPlacement

    A property of the environment probe subsystem that, if enabled, automatically generates environment probes for the scene. This method is obsolete. Use automaticPlacementRequested or automaticPlacementEnabled instead.

    Declaration
    [Obsolete("Use automaticPlacementRequested or automaticPlacementEnabled instead. (2020-01-16)")]
    public bool automaticPlacement { get; set; }
    Property Value
    Type Description
    bool

    true if automatic environment probe placement is enabled. Otherwise, false.

    automaticPlacementEnabled

    true if automatic placement is enabled on the subsystem.

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

    automaticPlacementRequested

    If enabled, requests automatic generation of environment probes for the scene.

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

    true if automatic environment probe placement is requested. Otherwise, false.

    debugPrefab

    Specifies a debug Prefab that will be attached to all environment probes.

    Declaration
    public GameObject debugPrefab { get; set; }
    Property Value
    Type Description
    GameObject

    A debug Prefab that will be attached to all environment probes.

    Remarks

    Setting a debug Prefab allows for these environment probes to be more readily visualized but is not required for normal operation of this manager. This script will automatically create reflection probes for all environment probes reported by the XREnvironmentProbeSubsystem.

    environmentTextureFilterMode

    Specifies the texture filter mode to be used with the environment texture.

    Declaration
    public FilterMode environmentTextureFilterMode { get; set; }
    Property Value
    Type Description
    FilterMode

    The texture filter mode to be used with the environment texture.

    environmentTextureHDR

    Specifies whether the environment textures should be returned as HDR textures.

    Declaration
    [Obsolete("Use environmentTextureHDRRequested or environmentTextureHDREnabled instead. (2020-01-16)")]
    public bool environmentTextureHDR { get; set; }
    Property Value
    Type Description
    bool

    true if the environment textures should be returned as HDR textures. Otherwise, false.

    environmentTextureHDREnabled

    Queries whether environment textures will be provided with high dynamic range.

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

    environmentTextureHDRRequested

    Get or set whether high dynamic range environment textures are requested.

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

    gameObjectName

    The name of the GameObject for each instantiated AREnvironmentProbe.

    Declaration
    protected override string gameObjectName { get; }
    Property Value
    Type Description
    string
    Overrides
    ARTrackableManager<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider, XREnvironmentProbe, AREnvironmentProbe>.gameObjectName

    Methods

    AddEnvironmentProbe(Pose, Vector3, Vector3)

    Creates a new environment probe at pose with scale and size if supported by the subsystem. Use the descriptor's supportsManualPlacement property to determine support for this feature. If successful, a new GameObject with an AREnvironmentProbe is created immediately; however, the provider might not report the environment probe as added until a future frame. Check the status of the probe by inspecting its pending property.

    Declaration
    [Obsolete("Add an environment probe using AddComponent<AREnvironmentProbe>(). (2020-10-06)")]
    public AREnvironmentProbe AddEnvironmentProbe(Pose pose, Vector3 scale, Vector3 size)
    Parameters
    Type Name Description
    Pose pose

    The position and rotation at which to create the new environment probe.

    Vector3 scale

    The scale of the new environment probe.

    Vector3 size

    The size (dimensions) of the new environment probe.

    Returns
    Type Description
    AREnvironmentProbe

    A new AREnvironmentProbe if successful, otherwise null.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if this manager is not enabled

    InvalidOperationException

    Thrown if this manager has no subsystem.

    NotSupportedException

    Thrown if manual placement is not supported by this subsystem. Check for support on the descriptor's supportsManualPlacement property.

    GetEnvironmentProbe(TrackableId)

    Attempts to find the environment probe matching the trackable ID currently in the scene.

    Declaration
    public AREnvironmentProbe GetEnvironmentProbe(TrackableId trackableId)
    Parameters
    Type Name Description
    TrackableId trackableId

    The trackable ID of an environment probe to search for.

    Returns
    Type Description
    AREnvironmentProbe

    Environment probe in the scene matching the trackableId, or null if no matching environment probe is found.

    GetPrefab()

    Gets the prefab that should be instantiated for each AREnvironmentProbe. May be null.

    Declaration
    protected override GameObject GetPrefab()
    Returns
    Type Description
    GameObject

    The prefab that should be instantiated for each AREnvironmentProbe.

    Overrides
    ARTrackableManager<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider, XREnvironmentProbe, AREnvironmentProbe>.GetPrefab()

    OnBeforeStart()

    Enables the environment probe functionality by registering listeners for the environment probe events, if the XREnvironmentProbeSubsystem exists, and enabling environment probes in the AR subsystem manager.

    Declaration
    protected override void OnBeforeStart()
    Overrides
    SubsystemLifecycleManager<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider>.OnBeforeStart()

    OnCreateTrackable(AREnvironmentProbe)

    Invoked when an AREnvironmentProbe is created.

    Declaration
    protected override void OnCreateTrackable(AREnvironmentProbe probe)
    Parameters
    Type Name Description
    AREnvironmentProbe probe

    The AREnvironmentProbe that was just created.

    Overrides
    ARTrackableManager<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider, XREnvironmentProbe, AREnvironmentProbe>.OnCreateTrackable(AREnvironmentProbe)

    OnDestroy()

    Destroys any game objects created by this environment probe manager for each environment probe, and clears the mapping of environment probes.

    Declaration
    protected override void OnDestroy()
    Overrides
    SubsystemLifecycleManager<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider>.OnDestroy()

    OnTrackablesChanged(List<AREnvironmentProbe>, List<AREnvironmentProbe>, List<AREnvironmentProbe>)

    Invoked when the base class detects trackable changes.

    Declaration
    protected override void OnTrackablesChanged(List<AREnvironmentProbe> added, List<AREnvironmentProbe> updated, List<AREnvironmentProbe> removed)
    Parameters
    Type Name Description
    List<AREnvironmentProbe> added

    The list of added AREnvironmentProbe.

    List<AREnvironmentProbe> updated

    The list of updated AREnvironmentProbe.

    List<AREnvironmentProbe> removed

    The list of removed AREnvironmentProbe.

    Overrides
    ARTrackableManager<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider, XREnvironmentProbe, AREnvironmentProbe>.OnTrackablesChanged(List<AREnvironmentProbe>, List<AREnvironmentProbe>, List<AREnvironmentProbe>)

    RemoveEnvironmentProbe(AREnvironmentProbe)

    Remove an existing environment probe. Support for this feature is provider-specific. Check for support with the descriptor's supportsRemovalOfManual and supportsRemovalOfAutomatic properties.

    Declaration
    [Obsolete("Call Destroy() on the AREnvironmentProbe component to remove it. (2020-10-06)")]
    public bool RemoveEnvironmentProbe(AREnvironmentProbe probe)
    Parameters
    Type Name Description
    AREnvironmentProbe probe

    The environment probe to remove

    Returns
    Type Description
    bool

    true if the environment probe was removed, otherwise false.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if this manager is not enabled.

    InvalidOperationException

    Thrown if subsystem is null.

    ArgumentNullException

    Thrown if probe is null.

    InvalidOperationException

    Thrown if the environment probe was manually placed, but removal of manually placed probes is not supported. You can check for this case with placementType and the descriptor's 'supportsRemovalOfManual` property.

    InvalidOperationException

    Thrown if the environment probe was automatically placed, but removal of automatically placed probes is not supported. You can check for this case with placementType and the descriptor's supportsRemovalOfAutomatic property.

    Events

    environmentProbesChanged

    Invoked once per frame with lists of environment probes that have been added, updated, and removed since the last frame.

    Declaration
    public event Action<AREnvironmentProbesChangedEvent> environmentProbesChanged
    Event Type
    Type Description
    Action<AREnvironmentProbesChangedEvent>
    In This Article
    Back to top
    Copyright © 2025 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)