docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRPlaneBuilder

    Defines a fluent API for constructing an XRPlane.

    Inheritance
    object
    XRPlaneBuilder
    Inherited Members
    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 XRPlaneBuilder

    Constructors

    XRPlaneBuilder()

    Construct an instance.

    Declaration
    public XRPlaneBuilder()

    Methods

    Build()

    Build an output XRPlane using all this builder's parameter values.

    Declaration
    public XRPlane Build()
    Returns
    Type Description
    XRPlane

    The built XRPlane.

    FromBoundedPlane(XRPlane)

    Copies values from an XRPlane to this instance.

    Declaration
    [Obsolete("FromBoundedPlane has been renamed in AR Foundation version 7.0. Use FromPlane instead. (UnityUpgradable) -> FromPlane(*)", true)]
    public XRPlaneBuilder FromBoundedPlane(XRPlane plane)
    Parameters
    Type Name Description
    XRPlane plane

    The XRPlane values to copy to this instance.

    Returns
    Type Description
    XRPlaneBuilder

    This instance.

    FromPlane(XRPlane)

    Copies values from an XRPlane to this instance.

    Declaration
    public XRPlaneBuilder FromPlane(XRPlane plane)
    Parameters
    Type Name Description
    XRPlane plane

    The XRPlane values to copy to this instance.

    Returns
    Type Description
    XRPlaneBuilder

    This instance.

    Reset()

    Reset the instance to default values.

    Declaration
    public void Reset()

    WithAlignment(PlaneAlignment)

    Set the plane alignment for built XRPlane instances.

    Declaration
    public XRPlaneBuilder WithAlignment(PlaneAlignment alignment)
    Parameters
    Type Name Description
    PlaneAlignment alignment

    The plane alignment.

    Returns
    Type Description
    XRPlaneBuilder

    This instance.

    WithCenter(Vector2)

    Set the center for built XRPlane instances.

    Declaration
    public XRPlaneBuilder WithCenter(Vector2 center)
    Parameters
    Type Name Description
    Vector2 center

    The center.

    Returns
    Type Description
    XRPlaneBuilder

    This instance.

    WithClassifications(PlaneClassifications)

    Set the classifications for built XRPlane instances.

    Declaration
    public XRPlaneBuilder WithClassifications(PlaneClassifications classifications)
    Parameters
    Type Name Description
    PlaneClassifications classifications

    The classifications.

    Returns
    Type Description
    XRPlaneBuilder

    This instance.

    WithNativePtr(IntPtr)

    Set the native pointer for built XRPlane instances.

    Declaration
    public XRPlaneBuilder WithNativePtr(IntPtr nativePtr)
    Parameters
    Type Name Description
    IntPtr nativePtr

    The native pointer.

    Returns
    Type Description
    XRPlaneBuilder

    This instance.

    WithParentId(TrackableId)

    Set the parent ID for built XRPlane instances.

    Declaration
    public XRPlaneBuilder WithParentId(TrackableId parentId)
    Parameters
    Type Name Description
    TrackableId parentId

    The parent ID.

    Returns
    Type Description
    XRPlaneBuilder

    This instance.

    WithPose(Pose)

    Set the pose for built XRPlane instances.

    Declaration
    public XRPlaneBuilder WithPose(Pose pose)
    Parameters
    Type Name Description
    Pose pose

    The pose.

    Returns
    Type Description
    XRPlaneBuilder

    This instance.

    WithSize(Vector2)

    Set the size for built XRPlane instances.

    Declaration
    public XRPlaneBuilder WithSize(Vector2 size)
    Parameters
    Type Name Description
    Vector2 size

    The size.

    Returns
    Type Description
    XRPlaneBuilder

    This instance.

    WithSubsumedById(TrackableId)

    Set the subsumed by ID for built XRPlane instances.

    Declaration
    public XRPlaneBuilder WithSubsumedById(TrackableId subsumedById)
    Parameters
    Type Name Description
    TrackableId subsumedById

    The subsumed by ID.

    Returns
    Type Description
    XRPlaneBuilder

    This instance.

    WithTrackableId(TrackableId)

    Set the trackable ID for built XRPlane instances.

    Declaration
    public XRPlaneBuilder WithTrackableId(TrackableId trackableId)
    Parameters
    Type Name Description
    TrackableId trackableId

    The trackable ID.

    Returns
    Type Description
    XRPlaneBuilder

    This instance.

    WithTrackingState(TrackingState)

    Set the tracking state for built XRPlane instances.

    Declaration
    public XRPlaneBuilder WithTrackingState(TrackingState trackingState)
    Parameters
    Type Name Description
    TrackingState trackingState

    The tracking state.

    Returns
    Type Description
    XRPlaneBuilder

    This instance.

    In This Article
    Back to top
    Copyright © 2026 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)