Navigation
API > API/Plugins > API/Plugins/SmartObjectsModule > API/Plugins/SmartObjectsModule/USmartObjectSubsystem
Description
Returns the component associated to the claim handle if still accessible. In some scenarios the component may no longer exist but its smart object data could (e.g. streaming)
| Name | GetSmartObjectComponent |
| 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")
USmartObjectComponent * GetSmartObjectComponent
(
const FSmartObjectClaimHandle & ClaimHandle,
ETrySpawnActorIfDehydrated TrySpawnActorIfDehydrated
) const
A pointer to the USmartObjectComponent* associated to the handle.
Parameters
| Name | Remarks |
|---|---|
| ClaimHandle | Handle to a claimed slot returned by any of the Claim methods. |
| TrySpawnActorIfDehydrated | Indicates if the subsystem should try to spawn the actor/component associated to the smart object if it is currently owned by an instanced actor. |