Navigation
API > API/Plugins > API/Plugins/SmartObjectsModule
SmartObject definition asset. Contains sharable information that can be used by multiple SmartObject instances at runtime.
| Name | USmartObjectDefinition |
| Type | class |
| Header File | /Engine/Plugins/Runtime/SmartObjects/Source/SmartObjectsModule/Public/SmartObjectDefinition.h |
| Include Path | #include "SmartObjectDefinition.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType, Blueprintable, CollapseCategories)
class USmartObjectDefinition :
public UDataAsset ,
public IPropertyBindingBindingCollectionOwner
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UDataAsset → USmartObjectDefinition
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
USmartObjectDefinition
(
const FObjectInitializer& ObjectInitializer |
SmartObjectDefinition.h |
Structs
| Name | Remarks |
|---|---|
| FSmartObjectDefinitionAssetVariation | Used internally by USmartObjectDefinition to store a variation of a definition asset. |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| PreviewData | FSmartObjectDefinitionPreviewData | Actor class used for previewing the user in the asset editor. | SmartObjectDefinition.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActivityTags | FGameplayTagContainer | Tags identifying this Smart Object's use case. | SmartObjectDefinition.h |
|
| ActivityTagsMergingPolicy | ESmartObjectTagMergingPolicy | Indicates how Tags from slots and parent object are combined to be evaluated by a TagQuery from a find request. | SmartObjectDefinition.h |
|
| BindingCollection | FSmartObjectBindingCollection | Property bindings. | SmartObjectDefinition.h |
|
| bValid | TOptional< bool > | SmartObjectDefinition.h | ||
| DefaultBehaviorDefinitions | TArray< TObjectPtr< USmartObjectBehaviorDefinition > > | List of behavior definitions of different types provided to SO's user if the slot does not provide one. | SmartObjectDefinition.h |
|
| DefinitionData | TArray< FSmartObjectDefinitionDataProxy > | Custom definition data items (struct inheriting from SmartObjectDefinitionData) for the whole Smart Object. | SmartObjectDefinition.h |
|
| FSmartObjectBindingCollection | friend | SmartObjectDefinition.h | ||
| ObjectTagFilter | FGameplayTagQuery | This object is available if instance tags match this query; always available if query is empty. | SmartObjectDefinition.h |
|
| Parameters | FInstancedPropertyBag | Parameters for the SmartObject definition | SmartObjectDefinition.h |
|
| ParametersID | FGuid | Binding ID for the parameters. | SmartObjectDefinition.h | |
| Preconditions | FWorldConditionQueryDefinition | Preconditions that must pass for the object to be found/used. | SmartObjectDefinition.h |
|
| RootID | FGuid | Binding ID for the whole asset. | SmartObjectDefinition.h | |
| Slots | TArray< FSmartObjectSlotDefinition > | Where SmartObject's user needs to stay to be able to activate it. | SmartObjectDefinition.h |
|
| UserTagFilter | FGameplayTagQuery | This object is available if user tags match this query; always available if query is empty. | SmartObjectDefinition.h |
|
| UserTagsFilteringPolicy | ESmartObjectTagFilteringPolicy | Indicates how TagQueries from slots and parent object will be processed against User Tags from a find request. | SmartObjectDefinition.h |
|
| Variations | TArray< FSmartObjectDefinitionAssetVariation > | Variations of the asset based on provided parameters, created on demand via GetAssetVariation(). | SmartObjectDefinition.h | |
| WorldConditionSchemaClass | TSubclassOf< USmartObjectWorldConditionSchema > | SmartObjectDefinition.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSmartObjectSlotDefinition & DebugAddSlot() |
Adds and returns a reference to a defaulted slot (used for testing purposes) | SmartObjectDefinition.h | |
bool FindSlotAndDefinitionDataIndexByID
(
const FGuid ID, |
Returns slot and definition data indices the ID represents. | SmartObjectDefinition.h | |
int32 FindSlotByID
(
const FGuid ID |
SmartObjectDefinition.h | ||
const FGameplayTagContainer & GetActivityTags() |
Returns the list of tags describing the activity associated to this definition | SmartObjectDefinition.h |
|
ESmartObjectTagMergingPolicy GetActivityTagsMergingPolicy() |
Returns the tag merging policy to apply on Activity tags from this definition | SmartObjectDefinition.h | |
USmartObjectDefinition * GetAssetVariation
(
const FInstancedPropertyBag& Parameters, |
Returns a variation of this asset with specified parameters applied. | SmartObjectDefinition.h | |
USmartObjectDefinition * GetAssetVariation
(
const FInstancedPropertyBag& |
SmartObjectDefinition.h | ||
const USmartObjectBehaviorDefinition * GetBehaviorDefinition
(
const int32 SlotIndex, |
Retrieves a specific type of behavior definition for a given slot. | SmartObjectDefinition.h | |
FBox GetBounds() |
Return bounds encapsulating all slots | SmartObjectDefinition.h |
|
const FInstancedPropertyBag & GetDefaultParameters() |
SmartObjectDefinition.h | ||
const T & GetDefinitionData () |
Returns a reference to the definition data of the specified type. | SmartObjectDefinition.h | |
const T * GetDefinitionDataPtr () |
Returns a pointer to the definition data of the specified type. | SmartObjectDefinition.h | |
FWorldConditionQueryDefinition & GetMutablePreconditions() |
SmartObjectDefinition.h | ||
FSmartObjectSlotDefinition & GetMutableSlot
(
const int32 Index |
SmartObjectDefinition.h |
|
|
TArrayView< FSmartObjectSlotDefinition > GetMutableSlots() |
Returns a view on all the slot definitions | SmartObjectDefinition.h | |
const FWorldConditionQueryDefinition & GetPreconditions() |
SmartObjectDefinition.h | ||
TSubclassOf< USmartObjectSlotValidationFilter > GetPreviewValidationFilterClass() |
SmartObjectDefinition.h | ||
const FSmartObjectSlotDefinition & GetSlot
(
const int32 Index |
SmartObjectDefinition.h | ||
void GetSlotActivityTags
(
const FSmartObjectSlotDefinition& SlotDefinition, |
Fills the provided GameplayTagContainer with the activity tags associated to the slot according to the tag merging policy. | SmartObjectDefinition.h | |
void GetSlotActivityTags
(
const int32 SlotIndex, |
Fills the provided GameplayTagContainer with the activity tags associated to the slot according to the tag merging policy. | SmartObjectDefinition.h |
|
TConstArrayView< FSmartObjectSlotDefinition > GetSlots() |
SmartObjectDefinition.h | ||
FTransform GetSlotWorldTransform
(
const int32 SlotIndex, |
Returns the transform (in world space) of the given slot index. | SmartObjectDefinition.h |
|
const FGameplayTagQuery & GetUserTagFilter() |
Returns the tag query to run on the user tags provided by a request to accept this definition | SmartObjectDefinition.h |
|
ESmartObjectTagFilteringPolicy GetUserTagsFilteringPolicy() |
Returns the tag filtering policy that should be applied on User tags by this definition | SmartObjectDefinition.h |
|
const USmartObjectWorldConditionSchema * GetWorldConditionSchema() |
SmartObjectDefinition.h | ||
const TSubclassOf< USmartObjectWorldConditionSchema > & GetWorldConditionSchemaClass() |
SmartObjectDefinition.h | ||
bool HasBeenValidated () |
Indicates if 'Validate' was called. | SmartObjectDefinition.h | |
bool IsDefinitionValid () |
Indicates the result of the last validation if 'Validate' was called. | SmartObjectDefinition.h | |
TOptional< bool > IsValid() |
Returns result of the last validation if `Validate_ was called; unset otherwise. | SmartObjectDefinition.h | |
bool IsValidSlotIndex
(
const int32 SlotIndex |
SmartObjectDefinition.h |
|
|
const TArray< FSmartObjectSlotDefinition > & K2_GetSlots() |
SmartObjectDefinition.h |
|
|
void SetActivityTags
(
const FGameplayTagContainer& InActivityTags |
Sets the list of tags describing the activity associated to this definition | SmartObjectDefinition.h | |
void SetActivityTagsMergingPolicy
(
const ESmartObjectTagMergingPolicy InActivityTagsMergingPolicy |
Sets the tag merging policy to apply on Activity tags from this definition | SmartObjectDefinition.h | |
void SetUserTagFilter
(
const FGameplayTagQuery& InUserTagFilter |
Sets the tag query to run on the user tags provided by a request to accept this definition | SmartObjectDefinition.h |
|
void SetUserTagsFilteringPolicy
(
const ESmartObjectTagFilteringPolicy InUserTagsFilteringPolicy |
Sets the tag filtering policy to apply on User tags by this definition | SmartObjectDefinition.h | |
bool Validate
(
TArray< TPair< EMessageSeverity::Type, FText > >* ErrorsToReport |
Performs validation for the current definition. | SmartObjectDefinition.h | |
| SmartObjectDefinition.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void GetAssetRegistryTags
(
FAssetRegistryTagsContext Context |
SmartObjectDefinition.h | ||
virtual void PostDuplicate
(
EDuplicateMode::Type DuplicateMode |
SmartObjectDefinition.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSmartObjectDefinitionDataHandle GetDataHandleByID
(
const FGuid StructID |
SmartObjectDefinition.h | ||
bool UpdateAndValidatePath
(
FPropertyBindingPath& Path |
Updates a single path and returns whether it is still valid. | SmartObjectDefinition.h | |
void UpdateBindingPaths() |
Updates the path for all bindings from the associated value and remove invalid ones. | SmartObjectDefinition.h | |
void UpdateSlotReferences() |
SmartObjectDefinition.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CollectSaveOverrides
(
FObjectCollectSaveOverridesContext SaveContext |
SmartObjectDefinition.h | ||
| SmartObjectDefinition.h | |||
virtual EDataValidationResult IsDataValid
(
FDataValidationContext& Context |
SmartObjectDefinition.h | ||
virtual void PostEditChangeChainProperty
(
FPropertyChangedChainEvent& PropertyChangedEvent |
SmartObjectDefinition.h | ||
virtual void PostInitProperties() |
SmartObjectDefinition.h | ||
virtual void PostLoad() |
SmartObjectDefinition.h | ||
virtual void PreSave
(
FObjectPreSaveContext SaveContext |
SmartObjectDefinition.h | ||
virtual void Serialize
(
FArchive& Ar |
SmartObjectDefinition.h |
Overridden from IPropertyBindingBindingCollectionOwner
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CreateParametersForStruct
(
const FGuid InStructID, |
SmartObjectDefinition.h | ||
virtual bool GetBindableStructByID
(
const FGuid InStructID, |
SmartObjectDefinition.h | ||
virtual void GetBindableStructs
(
const FGuid InTargetStructID, |
SmartObjectDefinition.h | ||
virtual bool GetBindingDataView
(
const FPropertyBindingBinding& InBinding, |
SmartObjectDefinition.h | ||
virtual bool GetBindingDataViewByID
(
const FGuid InStructID, |
SmartObjectDefinition.h | ||
| SmartObjectDefinition.h | |||
virtual const FPropertyBindingBindingCollection * GetEditorPropertyBindings () |
SmartObjectDefinition.h | ||
virtual FGuid GetFallbackStructID() |
SmartObjectDefinition.h | ||
virtual void OnPropertyBindingChanged
(
const FPropertyBindingPath& InSourcePath, |
SmartObjectDefinition.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| SmartObjectDefinition.h | |||
static const USmartObjectBehaviorDefinition * GetBehaviorDefinitionByType
(
const TArray< USmartObjectBehaviorDefinition* >& BehaviorDefinitions, |
Finds first behavior definition of a given class in the provided list of definitions. | SmartObjectDefinition.h | |
static uint64 GetVariationParametersHash
(
const FInstancedPropertyBag& Parameters |
Calculates hash of the parameters. | SmartObjectDefinition.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| PreviewClass_DEPRECATED | TSoftClassPtr< AActor > | Actor class used for previewing the definition in the asset editor. | SmartObjectDefinition.h | |
| PreviewMeshPath_DEPRECATED | FSoftObjectPath | Path of the static mesh used for previewing the definition in the asset editor. | SmartObjectDefinition.h |