docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SelectTool

    SelectTool(IUsesSelectTool, Transform, Type, bool, bool)

    Method used to select tools from the menu

    Declaration
    public static bool SelectTool(this IUsesSelectTool user, Transform rayOrigin, Type toolType, bool despawnOnReselect = true, bool hideMenu = false)
    Parameters
    Type Name Description
    IUsesSelectTool user

    The functionality user

    Transform rayOrigin

    The rayOrigin that the tool should spawn under

    Type toolType

    Type of tool to spawn/select

    bool despawnOnReselect

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

    bool hideMenu

    Whether to hide the menu after selecting this tool

    Returns
    Type Description
    bool

    Whether the tool was successfully selected

    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)