unreal.SmartObjectDefinition
¶
- class unreal.SmartObjectDefinition(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
DataAsset
SmartObject definition asset. Contains sharable information that can be used by multiple SmartObject instances at runtime.
C++ Source:
Plugin: SmartObjects
Module: SmartObjectsModule
File: SmartObjectDefinition.h
Editor Properties: (see get_editor_property/set_editor_property)
activity_tags
(GameplayTagContainer): [Read-Write] Tags identifying this Smart Object’s use case. Can be used while looking for objects supporting given activityactivity_tags_merging_policy
(SmartObjectTagMergingPolicy): [Read-Write] Indicates how Tags from slots and parent object are combined to be evaluated by a TagQuery from a find request.default_behavior_definitions
(Array[SmartObjectBehaviorDefinition]): [Read-Write] List of behavior definitions of different types provided to SO’s user if the slot does not provide one.definition_data
(Array[SmartObjectDefinitionDataProxy]): [Read-Write] Custom definition data items (struct inheriting from SmartObjectDefinitionData) for the whole Smart Object.object_tag_filter
(GameplayTagQuery): [Read-Write] deprecated: Use FWorldCondition_SmartObjectActorTagQuery or FSmartObjectWorldConditionObjectTagQuery in Preconditions instead.parameters
(InstancedPropertyBag): [Read-Write] Parameters for the SmartObject definitionpreconditions
(WorldConditionQueryDefinition): [Read-Write] Preconditions that must pass for the object to be found/used.slots
(Array[SmartObjectSlotDefinition]): [Read-Write] Where SmartObject’s user needs to stay to be able to activate it. These will be used by AI to approach the object. Locations are relative to object’s location.user_tag_filter
(GameplayTagQuery): [Read-Write] This object is available if user tags match this query; always available if query is empty.user_tags_filtering_policy
(SmartObjectTagFilteringPolicy): [Read-Write] Indicates how TagQueries from slots and parent object will be processed against User Tags from a find request.world_condition_schema_class
(type(Class)): [Read-Write]
- get_activity_tags() GameplayTagContainer ¶
Returns the list of tags describing the activity associated to this definition
- Return type:
- get_mutable_slot(index) SmartObjectSlotDefinition ¶
- Parameters:
index (int32) –
- Returns:
mutable slot definition stored at a given index
- Return type:
- get_slot_activity_tags_by_index(slot_index) GameplayTagContainer ¶
Fills the provided GameplayTagContainer with the activity tags associated to the slot according to the tag merging policy.
- Parameters:
slot_index (int32) – Index of the slot for which the tags are requested
- Returns:
out_activity_tags (GameplayTagContainer): Tag container to fill with the activity tags associated to the slot
- Return type:
- get_slot_world_transform(slot_index, owner_transform) Transform ¶
Returns the transform (in world space) of the given slot index. note: Method will ensure on invalid slot index.
- get_user_tag_filter() GameplayTagQuery ¶
Returns the tag query to run on the user tags provided by a request to accept this definition
- Return type:
- get_user_tags_filtering_policy() SmartObjectTagFilteringPolicy ¶
Returns the tag filtering policy that should be applied on User tags by this definition
- Return type:
- is_valid_slot_index(slot_index) bool ¶
- Parameters:
slot_index (int32) –
- Returns:
True if specified slot index is valid.
- Return type:
- k2_get_slots() Array[SmartObjectSlotDefinition] ¶
K2 Get Slots
- Return type:
- property object_tag_filter: GameplayTagQuery¶
[Read-Write] deprecated: Use FWorldCondition_SmartObjectActorTagQuery or FSmartObjectWorldConditionObjectTagQuery in Preconditions instead.
- Type:
- set_user_tag_filter(user_tag_filter) None ¶
Sets the tag query to run on the user tags provided by a request to accept this definition
- Parameters:
user_tag_filter (GameplayTagQuery) –