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 |