Navigation
API > API/Plugins > API/Plugins/SmartObjectsModule > API/Plugins/SmartObjectsModule/USmartObjectSubsystem
References
| Module | SmartObjectsModule |
| Header | /Engine/Plugins/Runtime/SmartObjects/Source/SmartObjectsModule/Public/SmartObjectSubsystem.h |
| Include | #include "SmartObjectSubsystem.h" |
| Source | /Engine/Plugins/Runtime/SmartObjects/Source/SmartObjectsModule/Private/SmartObjectSubsystem.cpp |
UFUNCTION (BlueprintCallable, Category="SmartObject",
Meta=(DisplayName="Set SmartObject Enabled (specific reason)", ReturnDisplayName="Status changed"))
bool SetEnabledForReason
(
const FSmartObjectHandle Handle,
FGameplayTag ReasonTag,
const bool bEnabled
)
Remarks
Enables or disables the entire smart object represented by the provided handle using the specified reason. Delegate 'OnEvent' is broadcasted with ESmartObjectChangeReason::OnEnabled/ESmartObjectChangeReason::OnDisabled if state changed. True when associated smart object is found and set (or already set) to desired state; false otherwise.
Parameters
| Name | Description |
|---|---|
| Handle | Handle to the smart object. |
| ReasonTag | Valid Tag to specify the reason for changing the enabled state of the object. Method will ensure if not valid (i.e. None). |
| bEnabled | If true enables the smart object, disables otherwise. |