docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XREnvironmentProbeSubsystem

    Defines an interface for interacting with environment probe functionality for creating realistic lighting and environment texturing in AR scenes.

    Inheritance
    object
    SubsystemWithProvider
    SubsystemWithProvider<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider>
    TrackingSubsystem<XREnvironmentProbe, XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider>
    XREnvironmentProbeSubsystem
    SimulationEnvironmentProbeSubsystem
    Implements
    ISubsystem
    Inherited Members
    TrackingSubsystem<XREnvironmentProbe, XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider>.GetChanges(Allocator)
    SubsystemWithProvider<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider>.OnCreate()
    SubsystemWithProvider<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider>.OnStart()
    SubsystemWithProvider<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider>.OnStop()
    SubsystemWithProvider<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider>.OnDestroy()
    SubsystemWithProvider<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider>.subsystemDescriptor
    SubsystemWithProvider<XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider>.provider
    SubsystemWithProvider.Start()
    SubsystemWithProvider.OnStart()
    SubsystemWithProvider.Stop()
    SubsystemWithProvider.OnStop()
    SubsystemWithProvider.Destroy()
    SubsystemWithProvider.OnDestroy()
    SubsystemWithProvider.running
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.ARSubsystems
    Assembly: Unity.XR.ARSubsystems.dll
    Syntax
    public class XREnvironmentProbeSubsystem : TrackingSubsystem<XREnvironmentProbe, XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider>, ISubsystem

    Constructors

    XREnvironmentProbeSubsystem()

    Constructs an XREnvironmentProbeSubsystem. Do not create this directly. Call Create on an XREnvironmentProbeSubsystemDescriptor obtained from the SubsystemManager.

    Declaration
    public XREnvironmentProbeSubsystem()

    Properties

    automaticPlacementEnabled

    True if the AR session will automatically place environment probes in the scene, false otherwise.

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

    automaticPlacementRequested

    Specifies whether the AR session should automatically place environment probes in the scene.

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

    true if automatic placement of environment probes is enabled. Otherwise, false.

    Remarks

    If both manual and automatic placement of environment probes are supported, manually placed environment probes can be specified via TryAddEnvironmentProbe(Pose, Vector3, Vector3, out XREnvironmentProbe) regardless of whether automatic placement is enabled or not.

    Exceptions
    Type Condition
    NotSupportedException

    Thrown when setting this value to true for implementations that do not support automatic placement.

    environmentTextureHDREnabled

    True if HDR environment textures are enabled.

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

    environmentTextureHDRRequested

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

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

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

    Methods

    GetChanges(Allocator)

    Get the changes (added, updated, and removed) environment probes since the last call to GetChanges(Allocator).

    Declaration
    public override TrackableChanges<XREnvironmentProbe> GetChanges(Allocator allocator)
    Parameters
    Type Name Description
    Allocator allocator

    The Allocator to use when allocating the returned NativeArrays.

    Returns
    Type Description
    TrackableChanges<XREnvironmentProbe>

    TrackableChanges<T> describing the planes that have been added, updated, and removed since the last call to GetChanges(Allocator). The caller owns the memory allocated with Allocator and is responsible for disposing it.

    Overrides
    TrackingSubsystem<XREnvironmentProbe, XREnvironmentProbeSubsystem, XREnvironmentProbeSubsystemDescriptor, XREnvironmentProbeSubsystem.Provider>.GetChanges(Allocator)

    Register(XREnvironmentProbeSubsystemCinfo)

    Registers a subsystem implementation based on the given subystem parameters.

    Declaration
    [Obsolete("XREnvironmentProbeSubsystem.Register(XREnvironmentProbeSubsystemCinfo) has been deprecated in AR Foundation version 6.0. Use XREnvironmentProbeSubsystemDescriptor.Register(XREnvironmentProbeSubsystemDescriptor.Cinfo) instead.")]
    public static bool Register(XREnvironmentProbeSubsystemCinfo environmentProbeSubsystemCinfo)
    Parameters
    Type Name Description
    XREnvironmentProbeSubsystemCinfo environmentProbeSubsystemCinfo

    The parameters defining the environment probe functionality implemented by the subsystem provider.

    Returns
    Type Description
    bool

    true if the subsystem implementation is registered. Otherwise, false.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the values specified in the environmentProbeSubsystemCinfo parameter are invalid. Typically, this happens when required parameters are null or empty or types that do not derive from the required base class.

    RemoveEnvironmentProbe(TrackableId)

    Asynchronously removes the environment probe matching the trackable ID from the AR session.

    Declaration
    public bool RemoveEnvironmentProbe(TrackableId trackableId)
    Parameters
    Type Name Description
    TrackableId trackableId

    Trackable ID of the environment probe to be removed from the AR session.

    Returns
    Type Description
    bool

    true if the environment probe is found in the current AR session and will be removed. Otherwise, false.

    Remarks

    RemoveEnvironmentProbe can be used to remove both manually placed and automatically placed environment probes if the implementation supports such removals, as indicated by the descriptor properties supportsRemovalOfManual and supportsRemovalOfAutomatic.

    Exceptions
    Type Condition
    NotSupportedException

    Thrown for platforms that do not support removal of the type of environment probe.

    TryAddEnvironmentProbe(Pose, Vector3, Vector3, out XREnvironmentProbe)

    Tries to create an environment probe.

    Declaration
    public bool TryAddEnvironmentProbe(Pose pose, Vector3 scale, Vector3 size, out XREnvironmentProbe environmentProbe)
    Parameters
    Type Name Description
    Pose pose

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

    Vector3 scale

    The scale at which to create the environment probe.

    Vector3 size

    The size (dimensions) of the environment probe to create.

    XREnvironmentProbe environmentProbe

    If successful, populated with the newly created environment probe. Otherwise, it will contain default values.

    Returns
    Type Description
    bool

    true if the environment probe was successfully added, otherwise false.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown when the environment probe subsystem is not running and this method is called to an add environment probe.

    NotSupportedException

    Thrown for platforms that do not support manual placement of environment probes.

    Implements

    ISubsystem
    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)