docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RaycastResultStateExtensions

    Extensions for the RaycastResultState enum.

    Inheritance
    object
    RaycastResultStateExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.MagicLeap
    Assembly: UnityEngine.XR.MagicLeap.dll
    Syntax
    public static class RaycastResultStateExtensions

    Methods

    Done(RaycastResultState)

    Whether the RaycastResultState has completed or not.

    Declaration
    public static bool Done(this RaycastResultState state)
    Parameters
    Type Name Description
    RaycastResultState state

    The RaycastResultState being extended.

    Returns
    Type Description
    bool

    true if state is not Pending.

    Error(RaycastResultState)

    Whether the RaycastResultState represents an error condition.

    Declaration
    public static bool Error(this RaycastResultState state)
    Parameters
    Type Name Description
    RaycastResultState state

    The RaycastResultState being extended.

    Returns
    Type Description
    bool

    true if the Success(RaycastResultState) returns false.

    Success(RaycastResultState)

    Whether the RaycastResultState represents a successful raycast hit.

    Declaration
    public static bool Success(this RaycastResultState state)
    Parameters
    Type Name Description
    RaycastResultState state

    The RaycastResultState being extended.

    Returns
    Type Description
    bool

    true if state represents a successful raycast hit (i.e., SuccessHitObserved or SuccessHitUnobserved) otherwise false.

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