Class UsesSelectToolMethods
Namespace: Unity.Labs.EditorXR.Interfaces
Syntax
public static class UsesSelectToolMethods
Methods
IsToolActive(IUsesSelectTool, Transform, Type)
Returns true if the active tool on the given ray origin is of the given type
Declaration
public static bool IsToolActive(this IUsesSelectTool user, Transform rayOrigin, Type type)
Parameters
Type | Name | Description |
---|---|---|
IUsesSelectTool | user | |
Transform | rayOrigin | The ray origin to check |
Type | type | The tool type to compare |
Returns
Type | Description |
---|---|
Boolean |
SelectTool(IUsesSelectTool, Transform, Type, Boolean, Boolean)
Method used to select tools from the menu Returns whether the tool was successfully selected
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 |
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 |