Navigation
API > API/Plugins > API/Plugins/SmartObjectsModule > API/Plugins/SmartObjectsModule/USmartObjectSubsystem
Description
Enables or disables the entire smart object represented by the provided handle using the default reason (i.e. Gameplay).. Delegate 'OnEvent' is broadcasted with ESmartObjectChangeReason::OnEnabled/ESmartObjectChangeReason::OnDisabled if state changed.
| Name | SetEnabled |
| Type | function |
| Header File | /Engine/Plugins/Runtime/SmartObjects/Source/SmartObjectsModule/Public/SmartObjectSubsystem.h |
| Include Path | #include "SmartObjectSubsystem.h" |
| Source | /Engine/Plugins/Runtime/SmartObjects/Source/SmartObjectsModule/Private/SmartObjectSubsystem.cpp |
UFUNCTION (BlueprintCallable, Category="SmartObject",
Meta=(DisplayName="Set SmartObject Enabled (default reason: Gameplay)", ReturnDisplayName="Status changed"))
bool SetEnabled
(
const FSmartObjectHandle Handle,
const bool bEnabled
)
True when associated smart object is found and set (or already set) to desired state; false otherwise.
Parameters
| Name | Remarks |
|---|---|
| Handle | Handle to the smart object. |
| bEnabled | If true enables the smart object, disables otherwise. |