docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct Result<T>

    Represents the result of a completed operation that attempted to create an object of type T.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.ARSubsystems
    Assembly: Unity.XR.ARSubsystems.dll
    Syntax
    public struct Result<T>
    Type Parameters
    Name Description
    T

    The result type.

    Constructors

    Result(XRResultStatus, T)

    Construct an instance with a given status and value.

    Declaration
    public Result(XRResultStatus status, T value)
    Parameters
    Type Name Description
    XRResultStatus status

    The status.

    T value

    The result value.

    Properties

    status

    The status of the completed operation. You should check whether the operation was successful before you access the result value.

    Declaration
    public XRResultStatus status { get; }
    Property Value
    Type Description
    XRResultStatus

    value

    The result value of the completed operation. Only valid if status.IsSuccess() is true.

    Declaration
    public T value { get; }
    Property Value
    Type Description
    T
    Remarks
    Important

    If the operation was unsuccessful, you should not access this value. It may be null or could contain default data.

    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)