Class UsesSceneRaycastMethods | Unity Reflect | 1.1.0-preview.6
docs.unity.cn
    Show / Hide Table of Contents

    Class UsesSceneRaycastMethods

    Inheritance
    Object
    UsesSceneRaycastMethods
    Namespace: Unity.Labs.EditorXR.Interfaces
    Syntax
    public static class UsesSceneRaycastMethods

    Methods

    Raycast(IUsesSceneRaycast, Ray, out RaycastHit, out GameObject, Single, List<GameObject>)

    Do a raycast against all Renderers

    Declaration
    public static bool Raycast(this IUsesSceneRaycast user, Ray ray, out RaycastHit hit, out GameObject go, float maxDistance = default(float), List<GameObject> ignoreList = null)
    Parameters
    Type Name Description
    IUsesSceneRaycast user

    The functionality user

    Ray ray

    The ray to use for the raycast

    RaycastHit hit

    Hit information

    GameObject go

    The GameObject which was hit, if any

    Single maxDistance

    The maximum distance of the raycast

    List<GameObject> ignoreList

    (optional) A list of Renderers to ignore

    Returns
    Type Description
    Boolean

    Whether the raycast hit a renderer

    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX