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

    Interface IProvidesSelectTool

    Provide access to tool selection

    Namespace: Unity.Labs.EditorXR.Interfaces
    Syntax
    public interface IProvidesSelectTool : IFunctionalityProvider

    Methods

    IsToolActive(Transform, Type)

    Returns true if the active tool on the given ray origin is of the given type

    Declaration
    bool IsToolActive(Transform rayOrigin, Type type)
    Parameters
    Type Name Description
    Transform rayOrigin

    The ray origin to check

    Type type

    The tool type to compare

    Returns
    Type Description
    Boolean

    SelectTool(Transform, Type, Boolean, Boolean)

    Method used to select tools from the menu Returns whether the tool was successfully selected

    Declaration
    bool SelectTool(Transform rayOrigin, Type toolType, bool despawnOnReselect = true, bool hideMenu = false)
    Parameters
    Type Name Description
    Transform rayOrigin

    The rayOrigin that the tool should spawn under

    Type toolType

    Type of tool to spawn/select

    Boolean despawnOnReselect

    Despawn the tool, if re-selected while already the current tool

    Boolean hideMenu

    Whether to hide the menu after selecting this tool

    Returns
    Type Description
    Boolean
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX