Navigation
API > API/Plugins > API/Plugins/SmartObjectsModule
Struct to store and manage state of a runtime instance associated to a given smart object definition
| Name | FSmartObjectRuntime |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/SmartObjects/Source/SmartObjectsModule/Public/SmartObjectRuntime.h |
| Include Path | #include "SmartObjectRuntime.h" |
Syntax
USTRUCT ()
struct FSmartObjectRuntime
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSmartObjectRuntime
(
const USmartObjectDefinition& Definition |
SmartObjectRuntime.h | ||
FSmartObjectRuntime
(
FSmartObjectRuntime&& Other |
SmartObjectRuntime.h | ||
FSmartObjectRuntime
(
const FSmartObjectRuntime& Other |
SmartObjectRuntime.h | ||
| Provide default constructor to be able to compile template instantiation 'UScriptStruct::TCppStructOps |
SmartObjectRuntime.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| MaxNumDisableFlags | int32 | SmartObjectRuntime.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Bounds | FBox | SmartObjectRuntime.h | ||
| Definition | TObjectPtr< const USmartObjectDefinition > | Associated smart object definition | SmartObjectRuntime.h | |
| DisableFlags | uint16 | Each slot has its own enabled state but the parent instance also have a more high level state that could be split into different reasons. | SmartObjectRuntime.h |
|
| OnEvent | FOnSmartObjectEvent | Delegate that is fired when the Smart Object changes. | SmartObjectRuntime.h | |
| OwnerComponent | TWeakObjectPtr< USmartObjectComponent > | Component that owns the Smart Object. May be empty if the parent Actor is not loaded. | SmartObjectRuntime.h | |
| OwnerData | FInstancedStruct | Struct used to store contextual data of the owner of that SmartObject. | SmartObjectRuntime.h | |
| PreconditionState | FWorldConditionQueryState | World condition runtime state. | SmartObjectRuntime.h |
|
| RegisteredHandle | FSmartObjectHandle | RegisteredHandle != FSmartObjectHandle::Invalid when registered with SmartObjectSubsystem | SmartObjectRuntime.h |
|
| Slots | TArray< FSmartObjectRuntimeSlot > | Runtime slots | SmartObjectRuntime.h |
|
| SpatialEntryData | FInstancedStruct | Spatial representation data associated to the current instance | SmartObjectRuntime.h |
|
| Tags | FGameplayTagContainer | Tags applied to the current instance | SmartObjectRuntime.h |
|
| Transform | FTransform | Instance specific transform | SmartObjectRuntime.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool ArePreconditionsInitialized() |
Indicates if preconditions were successfully initialized. | SmartObjectRuntime.h | |
FString DebugGetDisableFlagsString() |
SmartObjectRuntime.h | ||
const USmartObjectDefinition & GetDefinition() |
SmartObjectRuntime.h | ||
const FOnSmartObjectEvent & GetEventDelegate() |
SmartObjectRuntime.h | ||
FOnSmartObjectEvent & GetMutableEventDelegate() |
SmartObjectRuntime.h | ||
FSmartObjectRuntimeSlot & GetMutableSlot
(
const int32 Index |
SmartObjectRuntime.h | ||
AActor * GetOwnerActor
(
ETrySpawnActorIfDehydrated TrySpawnActorIfDehydrated |
Returns the actor associated to the smart object instance. | SmartObjectRuntime.h | |
USmartObjectComponent * GetOwnerComponent
(
ETrySpawnActorIfDehydrated TrySpawnActorIfDehydrated |
Returns the actor associated to the smart object instance. | SmartObjectRuntime.h | |
FSmartObjectHandle GetRegisteredHandle() |
SmartObjectRuntime.h | ||
const FSmartObjectRuntimeSlot & GetSlot
(
const int32 Index |
SmartObjectRuntime.h | ||
TConstArrayView< FSmartObjectRuntimeSlot > GetSlots() |
SmartObjectRuntime.h | ||
const FGameplayTagContainer & GetTags() |
Returns all tags assigned to the smart object instance | SmartObjectRuntime.h | |
const FTransform & GetTransform() |
SmartObjectRuntime.h | ||
bool IsEnabled() |
Indicates if the Smart Object is enabled regardless of the reason. | SmartObjectRuntime.h | |
bool IsEnabledForReason
(
FGameplayTag ReasonTag |
Indicates if the Smart Object is enabled based on a specific reason. | SmartObjectRuntime.h | |
void SetEnabled
(
FGameplayTag ReasonTag, |
Enables or disables the entire smart object. | SmartObjectRuntime.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSmartObjectRuntime & operator=
(
const FSmartObjectRuntime& Other |
SmartObjectRuntime.h | ||
FSmartObjectRuntime & operator=
(
FSmartObjectRuntime&& Other |
SmartObjectRuntime.h |