Limen Framework 0.1 Help

ULimenSnapAnchorComponent

Overview

ULimenSnapAnchorComponent is a custom component derived from UArrowComponent. It provides functionality for attaching actors to anchor points, managing the attachment state, and broadcasting events when anchors are added or removed. This component can be spawned in Blueprints and used to control the positioning and attachment of actors within the game world.

Properties

Type

Name

Access

Description

FName

TargetAnchorId

EditAnywhere, BlueprintReadWrite, Category = "Anchor"

The ID of the target anchor point.

TWeakObjectPtr<AActor>

AnchorTargetActor

EditAnywhere, Category = "Debug"

The actor to which the component will attempt to attach when using debug functions.

bool

bAttach

EditAnywhere, Category = "Debug"

Whether to attach the owner to the anchor point during debugging.

TWeakObjectPtr<ULimenAnchorPointComponent>

CurrentAnchor

BlueprintReadOnly, meta=(AllowPrivateAccess=true)

The current anchor point that the component is attached to.

Functions

Return Type

Signature

Description

ULimenSnapAnchorComponent*

GetAnchorByTargetId(const AActor* InActor, const FName& TargetId)

Retrieves a ULimenSnapAnchorComponent by its target ID from the given actor.

void

AnchorTo(ULimenAnchorPointComponent* InTarget, bool bAttachToAnchor = true)

Anchors the component to the specified anchor point.

void

AnchorToActor(AActor* InTarget, FName AnchorId, bool bAttachToAnchor = true)

Anchors the component to an actor's anchor point with the given ID.

void

RemoveCurrentAnchor(bool bDetachFromAnchor = true)

Removes the current anchor from the component.

const FName&

GetTargetAnchorId() const

Returns the target anchor ID of the component.

ULimenAnchorPointComponent*

GetCurrentAnchor() const

Retrieves the current anchor point that the component is attached to.

Usage & Implementation Notes

  • Threading Constraints: This component does not have any specific threading constraints.

  • Replication Requirements: None.

  • Memory Lifetime Management: The component uses TWeakObjectPtr for managing weak references to actors and components, which helps in avoiding memory leaks by automatically invalidating pointers when the objects are destroyed.

  • Initialization Dependencies: The component initializes its properties through the constructor.

22 May 2026