Navigation
Unreal Engine C++ API Reference > Runtime > InteractiveToolsFramework > BaseTools
Inheritance Hierarchy
- UObject
- IInputBehaviorSource
- UInteractiveTool
- USingleClickTool
- UAddPatchTool
- UAddPrimitiveTool
- UAddArrowPrimitiveTool
- UAddBoxPrimitiveTool
- UAddCapsulePrimitiveTool
- UAddConePrimitiveTool
- UAddCylinderPrimitiveTool
- UAddDiscPrimitiveTool
- UAddRectanglePrimitiveTool
- UAddSpherePrimitiveTool
- UAddStairsPrimitiveTool
- UAddTorusPrimitiveTool
- UMeshClickTool
- UTextureAssetAdapterClickTool
- UTextureColorAdapterClickTool
- UVertexAdapterClickTool
References
Module | InteractiveToolsFramework |
Header | /Engine/Source/Runtime/InteractiveToolsFramework/Public/BaseTools/SingleClickTool.h |
Include | #include "BaseTools/SingleClickTool.h" |
Syntax
UCLASS (MinimalAPI)
class USingleClickTool :
public UInteractiveTool ,
public IClickBehaviorTarget
Remarks
USingleClickTool is perhaps the simplest possible interactive tool. It simply reacts to default primary button clicks for the active device (eg left-mouse clicks).
The function IsHitByClick() determines what is clickable by this Tool. The default is to return true, which means the click will activate anywhere (the Tool itself has no notion of Actors, Components, etc). You can override this function to, for example, filter out clicks that don't hit a target object, etc.
The function OnClicked() implements the action that will occur when a click happens. You must override this to implement any kind of useful behavior.
Overridden from UInteractiveTool
Type | Name | Description | |
---|---|---|---|
void | Setup () |
Register default primary-button-click InputBehaviors |
Overridden from IClickBehaviorTarget
Type | Name | Description | |
---|---|---|---|
FInputRayHit | IsHitByClick
(
const FInputDeviceRay& ClickPos |
Test if the Target is hit at this 2D position / 3D ray | |
void | OnClicked
(
const FInputDeviceRay& ClickPos |
Click the Target at this 2D position / 3D ray. Default behavior is to print debug string. |