docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XREnvironmentProbeSubsystem.Provider

    The class for providers to implement to support the XREnvironmentProbeSubsystem.

    Inheritance
    object
    SubsystemProvider
    SubsystemProvider<XREnvironmentProbeSubsystem>
    XREnvironmentProbeSubsystem.Provider
    Inherited Members
    SubsystemProvider<XREnvironmentProbeSubsystem>.TryInitialize()
    SubsystemProvider<XREnvironmentProbeSubsystem>.Start()
    SubsystemProvider<XREnvironmentProbeSubsystem>.Stop()
    SubsystemProvider<XREnvironmentProbeSubsystem>.Destroy()
    SubsystemProvider.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 abstract class XREnvironmentProbeSubsystem.Provider : SubsystemProvider<XREnvironmentProbeSubsystem>

    Properties

    automaticPlacementEnabled

    Overridden by the provider implementation to query whether automatic placement is enabled for the environment probe subsystem.

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

    automaticPlacementRequested

    Overridden by the provider implementation to set the automatic placement request state for the environment probe subsystem.

    Declaration
    public virtual bool automaticPlacementRequested { get; set; }
    Property Value
    Type Description
    bool
    Exceptions
    Type Condition
    NotSupportedException

    Thrown in the default implementation if set to true.

    environmentTextureHDREnabled

    Overridden by the provider implementation to query the state of HDR environment texture generation.

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

    environmentTextureHDRRequested

    Overridden by the provider implementation to request the state of HDR environment texture generation.

    Declaration
    public virtual bool environmentTextureHDRRequested { get; set; }
    Property Value
    Type Description
    bool
    Exceptions
    Type Condition
    NotSupportedException

    Thrown if HDR textures are requested but the implementation does not support HDR environment textures.

    Methods

    GetChanges(XREnvironmentProbe, Allocator)

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

    Declaration
    public abstract TrackableChanges<XREnvironmentProbe> GetChanges(XREnvironmentProbe defaultEnvironmentProbe, Allocator allocator)
    Parameters
    Type Name Description
    XREnvironmentProbe defaultEnvironmentProbe

    A default value for environment probes. Implementations should first fill their output arrays with copies of this value, then copy in their own. See the NativeCopyUtility. This allows additional fields to be added to the XREnvironmentProbe in the future.

    Allocator allocator

    The allocator to use for the NativeArrays in the returned TrackableChanges<T>.

    Returns
    Type Description
    TrackableChanges<XREnvironmentProbe>

    The environment probes which have been added, updated, and removed since the last call to this method.

    See Also
    NativeCopyUtility

    RemoveEnvironmentProbe(TrackableId)

    Overridden by the provider to remove the environment probe matching the trackable ID from the AR session.

    Declaration
    public virtual 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 whether the environment probe is found in the current AR session and will be removed. Otherwise, false.

    Remarks

    You can use this method to remove both manually placed and automatically placed environment probes if the implementation supports such removals. Providers should implement this method to remove environment probes of the allowed types and to throw a System.NotSupportedException for removals of environment probes of disallowed types.

    Exceptions
    Type Condition
    NotSupportedException

    Thrown in the default implementation.

    TryAddEnvironmentProbe(Pose, Vector3, Vector3, out XREnvironmentProbe)

    Overridden by the provider implementation to manually add an environment probe to the AR session.

    Declaration
    public virtual 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 new environment probe.

    Vector3 scale

    The scale of the new environment probe.

    Vector3 size

    The size (dimensions) of the new environment probe.

    XREnvironmentProbe environmentProbe

    If successful, should be populated with the newly created environment probe.

    Returns
    Type Description
    bool

    true if a new environment probe was created, otherwise false.

    Exceptions
    Type Condition
    NotSupportedException

    Thrown in the default implementation of this method.

    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)