Files
UE5-Modular-Game-Framework/docs/blueprints/14-data-assets/122_DA_InteractionData.md
Lefteris Notas 411edea8ce add blueprints
2026-05-19 13:22:27 +03:00

2.6 KiB

DA_InteractionData — Data Asset

Parent Class: UDataAsset Dependencies: BPC_InteractionDetector, I_Interactable Purpose: Defines interaction properties for interactable world objects — prompt text, hold duration, required items, and context tags.


Variables / Structure

Field Type Description
InteractionTag FGameplayTag Unique tag for this interaction type
ActionLabel FText "Open", "Pick Up", "Pull Lever", etc.
ObjectName FText Display name of the object
bRequiresHold bool Whether interaction requires hold input
HoldDuration float Seconds to hold (if bRequiresHold)
ActionKeyIcon UTexture2D* Platform-specific input icon
ContextTags TArray<FText> Display tags: "Safe", "Locked", "Dangerous"
bConsumeOnInteract bool Item is consumed after interaction
InteractionCooldown float Seconds before re-interaction allowed
RequiredItemTag FGameplayTag Item required in inventory to interact
bBlockDuringCombat bool Interaction blocked during combat
InteractionRange float Max distance for interaction (cm)
PromptOffset FVector2D Screen offset for prompt widget

Gameplay Tags

  • Namespace: Interaction.<Type> (e.g., Interaction.Open, Interaction.Pickup)
  • Required item tags in Item.<Category> namespace

Validation Rules

  • ActionLabel must not be empty
  • HoldDuration > 0 if bRequiresHold is true
  • InteractionTag must be unique across all interaction DAs
  • InteractionRange must be > 0

Example Data

Example 1: Door

Field Value
InteractionTag Interaction.Door.Open
ActionLabel "Open"
ObjectName "Wooden Door"
bRequiresHold false
InteractionRange 200.0

Example 2: Locked Chest

Field Value
InteractionTag Interaction.Chest.Locked
ActionLabel "Unlock"
ObjectName "Iron Chest"
bRequiresHold true
HoldDuration 1.5
RequiredItemTag Item.Key.IronKey

Consumed By

Reuse Notes

  • All interactable objects reference this DA via a TSoftObjectPtr on their component
  • Context tags drive HUD prompt coloring and iconography