Navigation
API > API/Plugins > API/Plugins/SmartObjectsModule
Subsystem that holds all registered smart object instances and offers the API for spatial queries and reservations.
[Notes regarding thread safety] The subsystem is not thread-safe, but a first pass has been made to make it possible to perform a set of operations from multiple threads. To use this mode the following compiler switch is required: #define WITH_SMARTOBJECT_MT_INSTANCE_LOCK 1
Not safe:
- runtime instance lifetime controlled from Registration/Unregistration (i.e., CreateSmartObject, RegisterCollection, UnregisterCollection, DestroySmartObject, etc.)
- queries: to prevent locking for a long time it is still required to send queries from a single thread (e.g., async request pattern like MassSmartObject)
Safe operation on a smart object instance or slot from an object or slot handle:
- query and set Enable state
- query and set Transform/Location
- query and set Tags
- update slot state (e.g., MarkSlotAsClaimed, MarkSlotAsReleased, etc.)
- use a slot view using ReadSlotData/MutateSlotData
| Name | USmartObjectSubsystem |
| Type | class |
| Header File | /Engine/Plugins/Runtime/SmartObjects/Source/SmartObjectsModule/Public/SmartObjectSubsystem.h |
| Include Path | #include "SmartObjectSubsystem.h" |
Syntax
UCLASS (MinimalAPI, Config=SmartObjects, defaultconfig, Transient)
class USmartObjectSubsystem : public UWorldSubsystem
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → USubsystem → UWorldSubsystem → USmartObjectSubsystem
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
USmartObjectSubsystem() |
SmartObjectSubsystem.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnMainCollectionChanged | FOnMainCollectionEvent | SmartObjectSubsystem.h | ||
| OnMainCollectionDirtied | FOnMainCollectionEvent | SmartObjectSubsystem.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddSlotData
(
const FSmartObjectClaimHandle& ClaimHandle, |
Adds state data to a slot instance. | SmartObjectSubsystem.h | |
void AddTagToInstance
(
const FSmartObjectHandle Handle, |
Adds a single tag to the smart object instance represented by the provided handle. | SmartObjectSubsystem.h |
|
void AddTagToSlot
(
const FSmartObjectSlotHandle SlotHandle, |
Adds a single tag to the smart object slot represented by the provided handle. | SmartObjectSubsystem.h |
|
void BindComponentToSimulation
(
USmartObjectComponent& SmartObjectComponent |
Binds a smart object component to an existing instance in the simulation. | SmartObjectSubsystem.h | |
bool CanBeClaimed
(
const FSmartObjectSlotHandle& SlotHandle, |
Checks whether given slot is free and can be claimed (i.e. slot and its parent are both enabled) | SmartObjectSubsystem.h | |
FSmartObjectHandle CreateSmartObject
(
const USmartObjectDefinition& Definition, |
Creates a new smart object runtime instance from an external system. | SmartObjectSubsystem.h | |
void DebugCleanupRuntime() |
Debugging helper to emulate the stop of the simulation to destroy all runtime data | SmartObjectSubsystem.h | |
void DebugDraw
(
FDebugRenderSceneProxy* DebugProxy |
SmartObjectSubsystem.h | ||
void DebugDrawCanvas
(
UCanvas* Canvas, |
SmartObjectSubsystem.h | ||
uint32 DebugGetNumRegisteredComponents() |
SmartObjectSubsystem.h | ||
uint32 DebugGetNumRuntimeObjects() |
SmartObjectSubsystem.h | ||
const TMap< FSmartObjectHandle, FSmartObjectRuntime > & DebugGetRuntimeObjects() |
SmartObjectSubsystem.h | ||
void DebugInitializeRuntime() |
Debugging helper to emulate the start of the simulation to create all runtime data | SmartObjectSubsystem.h | |
void DebugRegisterAllSmartObjects() |
Debugging helpers to add all registered smart objects to the simulation | SmartObjectSubsystem.h | |
void DebugUnregisterAllSmartObjects() |
Debugging helper to remove all registered smart objects from the simulation | SmartObjectSubsystem.h | |
bool DestroySmartObject
(
FSmartObjectHandle Handle |
Removes the smart object runtime data from the simulation, destroys it and unbinds and unregister associated component if any. | SmartObjectSubsystem.h | |
bool EvaluateSelectionConditions
(
const FSmartObjectSlotHandle& SlotHandle, |
Evaluates conditions of the specified slot and its parent smart object. | SmartObjectSubsystem.h | |
TArray< FSmartObjectRequestResult > FilterResultsBySelectionConditions
(
const TConstArrayView< FSmartObjectRequestResult >& ResultsToFilter, |
Evaluates conditions of the slot specified by each request result and add to the result array on success. | SmartObjectSubsystem.h | |
TArray< FSmartObjectSlotHandle > FilterSlotsBySelectionConditions
(
const TConstArrayView< FSmartObjectSlotHandle >& SlotsToFilter, |
Evaluates conditions of each slot and add to the result array on success. | SmartObjectSubsystem.h | |
bool FindEntranceLocationForSlot
(
const FSmartObjectSlotHandle& SlotHandle, |
Finds entrance location for a specific slot. | SmartObjectSubsystem.h | |
void FindSlots
(
const FSmartObjectHandle Handle, |
Returns slots of a given smart object matching the filter. | SmartObjectSubsystem.h | |
FSmartObjectRequestResult FindSmartObject
(
const FSmartObjectRequest& Request, |
Spatial lookup for first slot in range respecting request criteria and selection conditions. | SmartObjectSubsystem.h | |
FSmartObjectRequestResult FindSmartObject
(
const FSmartObjectRequest& Request, |
Spatial lookup for first slot in range respecting request criteria and selection conditions. | SmartObjectSubsystem.h |
|
bool FindSmartObjects
(
const FSmartObjectRequest& Request, |
Spatial lookup for slot candidates respecting request criteria and selection conditions. | SmartObjectSubsystem.h | |
bool FindSmartObjects
(
const FSmartObjectRequest& Request, |
DEPRECATED BLOCK BEGIN | SmartObjectSubsystem.h |
|
bool FindSmartObjects_BP
(
const FSmartObjectRequest& Request, |
Blueprint function for spatial lookup for slot candidates respecting request criteria and selection conditions. | SmartObjectSubsystem.h |
|
bool FindSmartObjectsInList
(
const FSmartObjectRequestFilter& Filter, |
Search list of specific actors (often from a physics query) for slot candidates respecting request criteria and selection conditions. | SmartObjectSubsystem.h | |
bool FindSmartObjectsInTargetingRequest
(
const FSmartObjectRequestFilter& Filter, |
Search the results of the given targeting request handle for smart objects that match the request criteria | SmartObjectSubsystem.h | |
void GetAllSlots
(
const FSmartObjectHandle Handle, |
Return all slots of a given smart object. | SmartObjectSubsystem.h |
|
const DefinitionType * GetBehaviorDefinition
(
const FSmartObjectClaimHandle& ClaimHandle |
Return the behavior definition of a given type from a claimed object. | SmartObjectSubsystem.h | |
const DefinitionType * GetBehaviorDefinition
(
const FSmartObjectRequestResult& RequestResult |
Return the behavior definition of a given type from a claimed object. | SmartObjectSubsystem.h | |
const USmartObjectBehaviorDefinition * GetBehaviorDefinition
(
const FSmartObjectClaimHandle& ClaimHandle, |
Return the behavior definition of a given type from a claimed object. | SmartObjectSubsystem.h |
|
const USmartObjectBehaviorDefinition * GetBehaviorDefinitionByRequestResult
(
const FSmartObjectRequestResult& RequestResult, |
Return the behavior definition of a given type from a request result. | SmartObjectSubsystem.h |
|
FOnSmartObjectEvent * GetEventDelegate
(
const FSmartObjectHandle SmartObjectHandle |
Returns pointer to the smart object instance event delegate. | SmartObjectSubsystem.h | |
const FGameplayTagContainer & GetInstanceTags
(
const FSmartObjectHandle Handle |
Returns the list of tags associated to the smart object instance represented by the provided handle. | SmartObjectSubsystem.h |
|
TArrayView< TWeakObjectPtr< ASmartObjectPersistentCollection > > GetMutableRegisteredCollections() |
SmartObjectSubsystem.h | ||
FSmartObjectContainer & GetMutableSmartObjectContainer() |
SmartObjectSubsystem.h | ||
FConstStructView GetOwnerData
(
const FSmartObjectHandle Handle |
Returns a view on the owner data for the smart object instance represented by the provided handle. | SmartObjectSubsystem.h | |
TConstArrayView< TWeakObjectPtr< ASmartObjectPersistentCollection > > GetRegisteredCollections() |
SmartObjectSubsystem.h | ||
FOnSmartObjectEvent * GetSlotEventDelegate
(
const FSmartObjectSlotHandle& SlotHandle |
Returns pointer to the smart object changed delegate associated to the provided handle. | SmartObjectSubsystem.h | |
TOptional< FVector > GetSlotLocation
(
const FSmartObjectClaimHandle& ClaimHandle |
Returns the position (in world space) of the slot associated to the given claim handle. | SmartObjectSubsystem.h | |
TOptional< FVector > GetSlotLocation
(
const FSmartObjectRequestResult& Result |
Returns the position (in world space) of the slot associated to the given request result. | SmartObjectSubsystem.h | |
TOptional< FVector > GetSlotLocation
(
const FSmartObjectSlotHandle& SlotHandle |
Returns the position (in world space) of the slot represented by the provided slot handle. | SmartObjectSubsystem.h | |
bool GetSlotLocation
(
const FSmartObjectClaimHandle& ClaimHandle, |
Returns the position (in world space) of the slot associated to the given claim handle. | SmartObjectSubsystem.h |
|
ESmartObjectSlotState GetSlotState
(
const FSmartObjectSlotHandle SlotHandle |
Returns the state of the given smart object Slot handle. | SmartObjectSubsystem.h |
|
const FGameplayTagContainer & GetSlotTags
(
const FSmartObjectSlotHandle SlotHandle |
Returns the list of tags associated to the smart object slot represented by the provided handle. | SmartObjectSubsystem.h |
|
TOptional< FTransform > GetSlotTransform
(
const FSmartObjectRequestResult& Result |
Returns the transform (in world space) of the slot associated to the given request result. | SmartObjectSubsystem.h | |
TOptional< FTransform > GetSlotTransform
(
const FSmartObjectSlotHandle& SlotHandle |
Returns the transform (in world space) of the slot represented by the provided slot handle. | SmartObjectSubsystem.h | |
bool GetSlotTransform
(
const FSmartObjectClaimHandle& ClaimHandle, |
Returns the transform (in world space) of the slot associated to the given claim handle. | SmartObjectSubsystem.h |
|
TOptional< FTransform > GetSlotTransform
(
const FSmartObjectClaimHandle& ClaimHandle |
Returns the transform (in world space) of the slot associated to the given claim handle. | SmartObjectSubsystem.h | |
FTransform GetSlotTransformChecked
(
const FSmartObjectSlotHandle& SlotHandle |
Similarly to GetSlotTransform fetches the transform (in world space) of the indicated slot, but assumes the slot handle is valid and that the EntityManager is known. | SmartObjectSubsystem.h | |
bool GetSlotTransformFromRequestResult
(
const FSmartObjectRequestResult& RequestResult, |
Returns the transform (in world space) of the slot associated to the given RequestResult. | SmartObjectSubsystem.h |
|
FSmartObjectSlotView GetSlotView
(
const FSmartObjectSlotHandle& SlotHandle |
SmartObjectSubsystem.h | ||
USmartObjectComponent * GetSmartObjectComponent
(
const FSmartObjectClaimHandle& ClaimHandle, |
Returns the component associated to the claim handle if still accessible. | SmartObjectSubsystem.h |
|
USmartObjectComponent * GetSmartObjectComponentByRequestResult
(
const FSmartObjectRequestResult& Result, |
Returns the component associated to the given request result In some scenarios the component may no longer exist but its smart object data could (e.g. streaming) | SmartObjectSubsystem.h |
|
const FSmartObjectContainer & GetSmartObjectContainer() |
SmartObjectSubsystem.h | ||
bool IsClaimedSmartObjectValid
(
const FSmartObjectClaimHandle& ClaimHandle |
Indicates if the object/slot referred to by the given handle are still accessible in the simulation. | SmartObjectSubsystem.h | |
bool IsEnabled
(
const FSmartObjectHandle Handle |
Returns the enabled state of the smart object represented by the provided handle regardless of the disabled reason. | SmartObjectSubsystem.h |
|
bool IsEnabledForReason
(
const FSmartObjectHandle Handle, |
Returns the enabled state of the smart object represented by the provided handle based on a specific reason. | SmartObjectSubsystem.h |
|
bool IsSmartObjectSlotValid
(
const FSmartObjectSlotHandle& SlotHandle |
Indicates if the slot referred to by the given handle is still accessible in the simulation. | SmartObjectSubsystem.h | |
bool IsSmartObjectValid
(
const FSmartObjectHandle Handle |
Indicates if the object referred to by the given handle is still accessible in the simulation. | SmartObjectSubsystem.h | |
FSmartObjectClaimHandle MarkSlotAsClaimed
(
const FSmartObjectSlotHandle& SlotHandle, |
Marks a smart object slot as claimed. | SmartObjectSubsystem.h | |
bool MarkSlotAsFree
(
const FSmartObjectClaimHandle& ClaimHandle |
Marks a claimed or occupied smart object as free. | SmartObjectSubsystem.h | |
const USmartObjectBehaviorDefinition * MarkSlotAsOccupied
(
const FSmartObjectClaimHandle& ClaimHandle, |
Marks a previously claimed smart object slot as occupied. | SmartObjectSubsystem.h | |
const DefinitionType * MarkSlotAsOccupied
(
const FSmartObjectClaimHandle& ClaimHandle |
Marks a previously claimed smart object slot as occupied. | SmartObjectSubsystem.h | |
bool MutateSlotData
(
const FSmartObjectSlotHandle& SlotHandle, |
Executes the provided function if a valid mutable view can be created for the provided slot handle. | SmartObjectSubsystem.h | |
bool ReadSlotData
(
const FSmartObjectSlotHandle& SlotHandle, |
Executes the provided function if a valid const view can be created for the provided slot handle. | SmartObjectSubsystem.h | |
ESmartObjectCollectionRegistrationResult RegisterCollection
(
ASmartObjectPersistentCollection& InCollection |
SmartObjectSubsystem.h | ||
void RegisterSlotInvalidationCallback
(
const FSmartObjectClaimHandle& ClaimHandle, |
Register a callback to be notified if the claimed slot is no longer available and user need to perform cleanup. | SmartObjectSubsystem.h | |
bool RegisterSmartObject
(
TNotNull< USmartObjectComponent* > SmartObjectComponent |
Registers a smart object components to the runtime simulation. | SmartObjectSubsystem.h | |
bool RegisterSmartObject
(
USmartObjectComponent& SmartObjectComponent |
SmartObjectSubsystem.h | ||
bool RegisterSmartObjectActor
(
const AActor& SmartObjectActor |
Registers to the runtime simulation all smart object components for a given actor. | SmartObjectSubsystem.h | |
bool Release
(
const FSmartObjectClaimHandle& ClaimHandle |
SmartObjectSubsystem.h |
|
|
bool RemoveSmartObject
(
USmartObjectComponent& SmartObjectComponent |
SmartObjectSubsystem.h | ||
bool RemoveSmartObject
(
TNotNull< USmartObjectComponent* > SmartObjectComponent |
Unregisters the component from the subsystem, unbinds it from the runtime simulation and removes its runtime data. | SmartObjectSubsystem.h | |
bool RemoveSmartObjectActor
(
const AActor& SmartObjectActor |
Removes all data associated to smart object components of a given actor from the simulation. | SmartObjectSubsystem.h | |
void RemoveTagFromInstance
(
const FSmartObjectHandle Handle, |
Removes a single tag from the smart object instance represented by the provided handle. | SmartObjectSubsystem.h |
|
bool RemoveTagFromSlot
(
const FSmartObjectSlotHandle SlotHandle, |
Removes a single tag from the smart object slot represented by the provided handle. | SmartObjectSubsystem.h |
|
bool SendSlotEvent
(
const FSmartObjectSlotHandle& SlotHandle, |
Sends event to a smart object slot. | SmartObjectSubsystem.h | |
bool SetEnabled
(
const FSmartObjectHandle Handle, |
Enables or disables the entire smart object represented by the provided handle using the default reason (i.e. Gameplay).. | SmartObjectSubsystem.h |
|
bool SetEnabledForReason
(
const FSmartObjectHandle Handle, |
Enables or disables the entire smart object represented by the provided handle using the specified reason. | SmartObjectSubsystem.h |
|
bool SetSlotEnabled
(
const FSmartObjectSlotHandle SlotHandle, |
Enables or disables the smart object slot represented by the provided handle. | SmartObjectSubsystem.h |
|
bool SetSmartObjectActorEnabled
(
const AActor& SmartObjectActor, |
Enables or disables all smart objects associated to the provided actor (multiple components). | SmartObjectSubsystem.h | |
void UnbindComponentFromSimulation
(
USmartObjectComponent& SmartObjectComponent |
Unbinds a smart object component from an existing instance in the simulation. | SmartObjectSubsystem.h | |
void UnregisterCollection
(
ASmartObjectPersistentCollection& InCollection |
SmartObjectSubsystem.h | ||
void UnregisterSlotInvalidationCallback
(
const FSmartObjectClaimHandle& ClaimHandle |
Unregisters a callback to be notified if the claimed slot is no longer available and user need to perform cleanup. | SmartObjectSubsystem.h | |
bool UnregisterSmartObject
(
USmartObjectComponent& SmartObjectComponent |
SmartObjectSubsystem.h | ||
bool UnregisterSmartObject
(
TNotNull< USmartObjectComponent* > SmartObjectComponent |
Unregisters the component from the subsystem, unbinds it from the runtime simulation and handles the associated runtime data according to the component registration type (i.e. runtime data associated to components from persistent collections will remain in the simulation). | SmartObjectSubsystem.h | |
bool UnregisterSmartObjectActor
(
const AActor& SmartObjectActor |
Unregisters from the simulation all smart object components for a given actor. | SmartObjectSubsystem.h | |
bool UpdateEntranceLocation
(
const FSmartObjectSlotEntranceHandle& EntranceHandle, |
Runs the same logic as FindEntranceLocationForSlot() but for a specific entrance location. | SmartObjectSubsystem.h | |
bool UpdateSmartObjectTransform
(
const FSmartObjectHandle Handle, |
Updates the smart object transform. | SmartObjectSubsystem.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AbortAll
(
const FSmartObjectHandle Handle, |
SmartObjectSubsystem.h | ||
void AbortAllInternal
(
const FSmartObjectHandle Handle, |
SmartObjectSubsystem.h | ||
bool ActivateObjectPreconditions
(
const FWorldConditionContextData& ContextData, |
SmartObjectSubsystem.h | ||
bool ActivateObjectPreconditionsInternal
(
const FWorldConditionContextData& ContextData, |
Activate preconditions on the main object. | SmartObjectSubsystem.h | |
bool ActivateSlotPreconditions
(
FWorldConditionContextData& ContextData, |
SmartObjectSubsystem.h | ||
bool ActivateSlotPreconditionsInternal
(
FWorldConditionContextData& ContextData, |
Activate preconditions on the specified slot. | SmartObjectSubsystem.h | |
FSmartObjectRuntime * AddCollectionEntryToSimulation
(
const FSmartObjectCollectionEntry& Entry, |
SmartObjectSubsystem.h | ||
FSmartObjectRuntime * AddCollectionEntryToSimulationInternal
(
const FSmartObjectCollectionEntry& Entry, |
Registers a collection entry to the simulation and creates its associated runtime instance. | SmartObjectSubsystem.h | |
FSmartObjectRuntime * AddComponentToSimulation
(
USmartObjectComponent& SmartObjectComponent, |
SmartObjectSubsystem.h | ||
FSmartObjectRuntime * AddComponentToSimulationInternal
(
TNotNull< USmartObjectComponent* > SmartObjectComponent, |
Registers a collection entry to the simulation and creates its associated runtime instance. | SmartObjectSubsystem.h | |
void AddContainerToSimulation
(
const FSmartObjectContainer& InSmartObjectContainer |
SmartObjectSubsystem.h | ||
void BindComponentToSimulationInternal
(
TNotNull< USmartObjectComponent* > SmartObjectComponent, |
Binds a smart object component to an existing instance in the simulation and notifies that it has been bound. | SmartObjectSubsystem.h | |
void BindComponentToSimulationInternal
(
USmartObjectComponent& SmartObjectComponent, |
SmartObjectSubsystem.h | ||
void BindPropertiesFromStruct
(
FWorldConditionContextData& ContextData, |
SmartObjectSubsystem.h | ||
void BindPropertiesFromStructInternal
(
FWorldConditionContextData& ContextData, |
Binds properties of the context data to property values of the user data struct when they match type and name. | SmartObjectSubsystem.h | |
virtual void CleanupRuntime() |
Removes all runtime data | SmartObjectSubsystem.h | |
FBox ComputeBounds
(
const UWorld& World |
Compute bounds from the given world | SmartObjectSubsystem.h | |
FSmartObjectRuntime * CreateRuntimeInstance
(
const FSmartObjectHandle Handle, |
Initializes preconditions, adds to the space partition structure using the specified bounds and broadcasts event. | SmartObjectSubsystem.h | |
void DestroyRuntimeInstanceInternal
(
const FSmartObjectHandle Handle, |
Destroy SmartObjectRuntime contents as Handle's representation. | SmartObjectSubsystem.h | |
bool EvaluateConditionsForFiltering
(
const FSmartObjectRuntime& SmartObjectRuntime, |
SmartObjectSubsystem.h | ||
bool EvaluateConditionsForFilteringInternal
(
const FSmartObjectRuntime& SmartObjectRuntime, |
Internal helper for filter methods to build the list of accepted slots by reusing context data and schema as much as possible. | SmartObjectSubsystem.h | |
bool EvaluateObjectConditions
(
const FWorldConditionContextData& ConditionContextData, |
SmartObjectSubsystem.h | ||
bool EvaluateObjectConditionsInternal
(
const FWorldConditionContextData& ConditionContextData, |
Use the provided context data that is expected to be already filled by calling 'SetupConditionContextCommonData' and evaluates all conditions associated to the specified object. | SmartObjectSubsystem.h | |
bool EvaluateSlotConditions
(
FWorldConditionContextData& ConditionContextData, |
SmartObjectSubsystem.h | ||
bool EvaluateSlotConditionsInternal
(
FWorldConditionContextData& ConditionContextData, |
Use the provided context data that is expected to be already filled by calling 'SetupConditionContextCommonData' and adds the slot related part. | SmartObjectSubsystem.h | |
void ExecuteOnSlotFilteredBySelectionConditions
(
const TConstStridedView< FSmartObjectSlotHandle > SlotsToFilter, |
SmartObjectSubsystem.h | ||
bool ExecuteOnValidatedMutableRuntime
(
const FSmartObjectHandle SlotHandle, |
Executes the provided function using the runtime instance associated to the provided handle. | SmartObjectSubsystem.h | |
bool ExecuteOnValidatedMutableRuntimeAndSlot
(
const FSmartObjectSlotHandle& SlotHandle, |
Executes the provided function using the runtime instance associated to the provided handle. | SmartObjectSubsystem.h | |
bool ExecuteOnValidatedRuntime
(
const FSmartObjectHandle SlotHandle, |
Executes the provided function using the runtime instance associated to the provided handle. | SmartObjectSubsystem.h | |
bool ExecuteOnValidatedRuntimeAndSlot
(
const FSmartObjectSlotHandle& SlotHandle, |
Executes the provided function using the runtime instance associated to the provided handle. | SmartObjectSubsystem.h | |
bool FindEntranceLocationInternal
(
const FSmartObjectSlotHandle& SlotHandle, |
Finds entrance location for a specific slot. | SmartObjectSubsystem.h | |
void FindSlots
(
const FSmartObjectHandle Handle, |
SmartObjectSubsystem.h | ||
void FindSlotsInternal
(
const FSmartObjectHandle Handle, |
Goes through all defined slots of smart object represented by SmartObjectRuntime and finds the ones matching the filter. | SmartObjectSubsystem.h | |
int32 GetRegisteredSmartObjectsCompatibleWithCollection
(
const ASmartObjectPersistentCollection& InCollection, |
SmartObjectSubsystem.h | ||
FSmartObjectRuntime * GetRuntimeInstance
(
const FSmartObjectHandle SmartObjectHandle |
SmartObjectSubsystem.h | ||
const FSmartObjectRuntime * GetRuntimeInstance
(
const FSmartObjectHandle SmartObjectHandle |
SmartObjectSubsystem.h | ||
FSmartObjectRuntime * GetRuntimeInstanceInternal
(
const FSmartObjectHandle SmartObjectHandle |
Returns the runtime instance associated to the provided handle | SmartObjectSubsystem.h | |
const FSmartObjectRuntime * GetRuntimeInstanceInternal
(
const FSmartObjectHandle SmartObjectHandle |
Returns the const runtime instance associated to the provided handle | SmartObjectSubsystem.h | |
FSmartObjectRuntime * GetValidatedMutableRuntime
(
const FSmartObjectHandle Handle, |
SmartObjectSubsystem.h | ||
bool GetValidatedMutableRuntimeAndSlot
(
const FSmartObjectSlotHandle SlotHandle, |
SmartObjectSubsystem.h | ||
bool GetValidatedMutableRuntimeAndSlotInternal
(
const FSmartObjectSlotHandle& SlotHandle, |
Returns the mutable runtime instance associated to the provided handle Method produces log messages with provided context if provided handle is not set or associated instance can't be found. | SmartObjectSubsystem.h | |
FSmartObjectRuntime * GetValidatedMutableRuntimeInternal
(
const FSmartObjectHandle Handle, |
Returns the mutable runtime instance associated to the provided handle Method produces log messages with provided context if provided handle is not set or associated instance can't be found. | SmartObjectSubsystem.h | |
const FSmartObjectRuntime * GetValidatedRuntime
(
const FSmartObjectHandle Handle, |
SmartObjectSubsystem.h | ||
bool GetValidatedRuntimeAndSlot
(
const FSmartObjectSlotHandle SlotHandle, |
SmartObjectSubsystem.h | ||
bool GetValidatedRuntimeAndSlotInternal
(
const FSmartObjectSlotHandle& SlotHandle, |
Returns the const runtime instance associated to the provided handle. | SmartObjectSubsystem.h | |
const FSmartObjectRuntime * GetValidatedRuntimeInternal
(
const FSmartObjectHandle Handle, |
Returns the const runtime instance associated to the provided handle. | SmartObjectSubsystem.h | |
void InitializeRuntime() |
Creates all runtime data using main collection | SmartObjectSubsystem.h | |
bool IsRunningOnServer() |
Returns true if this subsystem is running on the server. | SmartObjectSubsystem.h | |
bool IsSlotValidVerbose
(
const FSmartObjectSlotHandle& SlotHandle, |
Indicates if the handle is set and the slot referred to is still accessible in the simulation. | SmartObjectSubsystem.h | |
void IterativelyBuildCollections() |
Iteratively adds items to registered collections. Expected to be called in World Partitined worlds. | SmartObjectSubsystem.h | |
const USmartObjectBehaviorDefinition * MarkSlotAsOccupied
(
FSmartObjectRuntime& SmartObjectRuntime, |
SmartObjectSubsystem.h | ||
const USmartObjectBehaviorDefinition * MarkSlotAsOccupiedInternal
(
FSmartObjectRuntime& SmartObjectRuntime, |
SmartObjectSubsystem.h | ||
void PopulateCollection
(
ASmartObjectPersistentCollection& InCollection |
SmartObjectSubsystem.h | ||
void RegisterCollectionInstances() |
Make sure that all SmartObjectCollection actors from our associated world are registered. | SmartObjectSubsystem.h | |
bool RemoveCollectionEntryFromSimulation
(
const FSmartObjectCollectionEntry& Entry |
Finds the runtime instance associated to the collection entry and removes it from the simulation. | SmartObjectSubsystem.h | |
void RemoveComponentFromSimulation
(
USmartObjectComponent& SmartObjectComponent |
SmartObjectSubsystem.h | ||
void RemoveComponentFromSimulation
(
TNotNull< USmartObjectComponent* > SmartObjectComponent |
Finds the runtime instance associated to the component and removes it from the simulation. | SmartObjectSubsystem.h | |
bool RemoveRuntimeInstanceFromSimulation
(
FSmartObjectRuntime& SmartObjectRuntime, |
SmartObjectSubsystem.h | ||
bool RemoveRuntimeInstanceFromSimulationInternal
(
FSmartObjectRuntime& SmartObjectRuntime, |
Removes a runtime instance from the simulation. | SmartObjectSubsystem.h | |
void SetupConditionContextCommonData
(
FWorldConditionContextData& ContextData, |
SmartObjectSubsystem.h | ||
void SetupConditionContextCommonDataInternal
(
FWorldConditionContextData& ContextData, |
Fills the provided context data with the smart object actor and handle associated to 'SmartObjectRuntime' and the subsystem. | SmartObjectSubsystem.h | |
bool TryActivatePreconditions
(
const FSmartObjectRuntime& SmartObjectRuntime |
SmartObjectSubsystem.h | ||
bool TryActivatePreconditionsInternal
(
const FSmartObjectRuntime& SmartObjectRuntime |
Activate preconditions on the main object and all its slots. | SmartObjectSubsystem.h | |
void UnbindComponentFromSimulationInternal
(
USmartObjectComponent& SmartObjectComponent, |
SmartObjectSubsystem.h | ||
void UnbindComponentFromSimulationInternal
(
TNotNull< USmartObjectComponent* > SmartObjectComponent, |
Unbinds a smart object component from the given FSmartObjectRuntime instance. | SmartObjectSubsystem.h | |
bool UnregisterSmartObjectInternal
(
USmartObjectComponent& SmartObjectComponent, |
SmartObjectSubsystem.h | ||
bool UnregisterSmartObjectInternal
(
TNotNull< USmartObjectComponent* > SmartObjectComponent, |
SmartObjectSubsystem.h |
Overridden from UWorldSubsystem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnWorldBeginPlay
(
UWorld& World |
BeginPlay will push all objects stored in the collection to the runtime simulation and initialize octree using collection bounds. | SmartObjectSubsystem.h | |
virtual void OnWorldComponentsUpdated
(
UWorld& World |
Callback overridden to gather loaded collections, spawn missing one and set the main collection. | SmartObjectSubsystem.h |
Overridden from USubsystem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Deinitialize() |
SmartObjectSubsystem.h | ||
virtual void Initialize
(
FSubsystemCollectionBase& Collection |
USubsystem BEGIN. | SmartObjectSubsystem.h | |
virtual bool ShouldCreateSubsystem
(
UObject* Outer |
SmartObjectSubsystem.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddTagToInstance
(
FSmartObjectRuntime& SmartObjectRuntime, |
SmartObjectSubsystem.h | ||
static void AddTagToInstanceInternal
(
FSmartObjectRuntime& SmartObjectRuntime, |
SmartObjectSubsystem.h | ||
static void CreatePersistentCollectionFromDeprecatedData
(
UWorld& World, |
Special-purpose function used to set up an instance of ASmartObjectPersistentCollection with data from a given instance of ADEPRECATED_SmartObjectCollection | SmartObjectSubsystem.h | |
static void FindMatchingSlotDefinitionIndices
(
const USmartObjectDefinition& Definition, |
SmartObjectSubsystem.h | ||
static void FindMatchingSlotDefinitionIndicesInternal
(
const USmartObjectDefinition& Definition, |
Applies filter on provided definition and fills OutValidIndices with indices of all valid slots. | SmartObjectSubsystem.h | |
static const USmartObjectBehaviorDefinition * GetBehaviorDefinition
(
const FSmartObjectRuntime& SmartObjectRuntime, |
SmartObjectSubsystem.h | ||
static const USmartObjectBehaviorDefinition * GetBehaviorDefinitionInternal
(
const FSmartObjectRuntime& SmartObjectRuntime, |
SmartObjectSubsystem.h | ||
static USmartObjectSubsystem * GetCurrent
(
const UWorld* World |
SmartObjectSubsystem.h | ||
static void OnSlotChanged
(
const FSmartObjectRuntime& SmartObjectRuntime, |
SmartObjectSubsystem.h | ||
static void OnSlotChangedInternal
(
const FSmartObjectRuntime& SmartObjectRuntime, |
SmartObjectSubsystem.h | ||
static bool QueryAllValidatedEntranceLocations
(
const UWorld* World, |
Runs the entrance validation logic for all the slots in the smart object definition and returns all validated locations. | SmartObjectSubsystem.h | |
static void QueryValidatedSlotEntranceLocationsInternal
(
const UWorld* World, |
Validates entrance locations for a specific slot. | SmartObjectSubsystem.h | |
static void RemoveTagFromInstance
(
FSmartObjectRuntime& SmartObjectRuntime, |
SmartObjectSubsystem.h | ||
static void RemoveTagFromInstanceInternal
(
FSmartObjectRuntime& SmartObjectRuntime, |
SmartObjectSubsystem.h |