ALimenInteractable
Overview
ALimenInteractable is a subclass of ALimenGameplayActor and implements the ILimenSaveObjectInterface. It manages interactable components, tracks interaction states, and provides events for when interactions start and stop. This class also handles saving and loading its state.
Properties
Type | Name | Access | Description |
|---|---|---|---|
FName | UniqueName | EditAnywhere, BlueprintReadOnly | A unique name for the interactable object. |
bool | bWasInteracted | SaveGame | Indicates whether the interactable has been interacted with at least once. |
bool | bIsBeingContinuouslyInteracted | Private | Tracks if the interactable is currently being continuously interacted with. |
Functions
Return Type | Signature | Description |
|---|---|---|
void | PostInitializeComponents() | Initializes interactable components and sets up interaction event bindings. |
TArray< ULimenInteractableComponent *> | GetInteractableComponents() const | Retrieves all interactable components attached to the actor. |
bool | IsBeingContinuouslyInteracted() const | Checks if the interactable is currently being continuously interacted with. |
bool | HasBeenInteracted() const | Determines if the interactable has been interacted with at least once. |
bool | ShouldSaveData() const override | Returns true, indicating that this object should save its data. |
bool | ShouldLoadData() const override | Returns true, indicating that this object should load its data. |
void | PreDataSaved() override | Called before the object's data is saved. |
void | PostDataSaved() override | Called after the object's data has been saved. |
void | PreDataLoaded() override | Called before the object's data is loaded. |
void | PostDataLoaded() override | Called after the object's data has been loaded. |
FName | GetUniqueDeterministicId() const override | Returns a unique name for the interactable, suitable for deterministic ID generation. |
void | SetUniqueName(const FName& NewUniqueName) | Sets a new unique name for the interactable. |
void | Interact(AController* InController, APawn* InPawn) | Handles the start of an interaction with the specified controller and pawn. |
void | InteractionStopped(AController* InController, APawn* InPawn) | Handles the end of an interaction with the specified controller and pawn. |
void | OnInteract_Internal(AController* InController, APawn* InPawn) | Internal method to handle internal logic for starting an interaction. |
void | OnInteractionStopped_Internal(AController* InController, APawn* InPawn) | Internal method to handle internal logic for ending an interaction. |
Usage & Implementation Notes
Threading Constraints: None.
Replication Requirements: This class does not require replication as it is a gameplay actor and its state is managed locally.
Memory Lifetime Management: The
UniqueNameproperty is marked withSaveGame, indicating that it should be saved and loaded. Ensure proper memory management for interactable components.Initialization Dependencies: Depends on the presence of
ULimenInteractableComponentin the actor's hierarchy to function correctly.