Struct XRReferenceObject | AR Subsystems | 2.2.0-preview.6
docs.unity3d.com
    Show / Hide Table of Contents

    Struct XRReferenceObject

    Represents a 3D scan of a real object that can be recognized in the environment.

    Namespace: UnityEngine.XR.ARSubsystems
    Syntax
    [Serializable]
    public struct XRReferenceObject : IEquatable<XRReferenceObject>
    Remarks

    Reference objects contain a list of provider-specific "entries". Each "entry" must have previously been generated in a format specific to its implementation of the XRObjectTrackingSubsystem.

    Properties

    guid

    A Guid unique to this reference object.

    Declaration
    public Guid guid { get; }
    Property Value
    Type Description
    Guid

    name

    A string name for this reference object.

    Declaration
    public string name { get; }
    Property Value
    Type Description
    String

    Methods

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    ValueType.Equals(Object)

    Equals(XRReferenceObject)

    Declaration
    public bool Equals(XRReferenceObject other)
    Parameters
    Type Name Description
    XRReferenceObject other
    Returns
    Type Description
    Boolean

    FindEntry(Type)

    Finds an XRReferenceObjectEntry by type.

    Declaration
    public XRReferenceObjectEntry FindEntry(Type type)
    Parameters
    Type Name Description
    Type type

    The specific type of XRReferenceObjectEntry to find.

    Returns
    Type Description
    XRReferenceObjectEntry

    The provider-specific XRReferenceObjectEntry if found, otherwise null.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if type is null.

    See Also
    FindEntry<T>()

    FindEntry<T>()

    Finds an XRReferenceObjectEntry by type.

    Declaration
    public T FindEntry<T>()
        where T : XRReferenceObjectEntry
    Returns
    Type Description
    T

    The provider-specific XRReferenceObjectEntry if found, otherwise null.

    Type Parameters
    Name Description
    T

    The specific type of XRReferenceObjectEntry to find.

    See Also
    FindEntry(Type)

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()

    Operators

    Equality(XRReferenceObject, XRReferenceObject)

    Declaration
    public static bool operator ==(XRReferenceObject lhs, XRReferenceObject rhs)
    Parameters
    Type Name Description
    XRReferenceObject lhs
    XRReferenceObject rhs
    Returns
    Type Description
    Boolean

    Inequality(XRReferenceObject, XRReferenceObject)

    Declaration
    public static bool operator !=(XRReferenceObject lhs, XRReferenceObject rhs)
    Parameters
    Type Name Description
    XRReferenceObject lhs
    XRReferenceObject rhs
    Returns
    Type Description
    Boolean

    See Also

    XRReferenceObjectLibrary
    XRReferenceObjectEntry
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023