Limen Framework 0.1 Help

FLimenSoftObjectPtr

Overview

FLimenSoftObjectPtr is a utility struct designed to manage soft object pointers (TSoftObjectPtr) with both asynchronous and synchronous loading capabilities. It provides methods to load objects asynchronously or synchronously, cast the loaded object to a specific type, and check if the pointer is valid or null.

Properties

Type

Name

Access

Description

TSoftObjectPtr<UObject>

SoftPtr

Protected

The soft object pointer that holds the reference to the UObject.

TStrongObjectPtr<UObject>

StrongPtr

Protected

A strong object pointer used for holding a hard reference to the loaded object.

Functions

Return Type

Signature

Description

void

LoadAsync()

Loads the soft object asynchronously using a default callback.

template

void LoadAsync(const TFunction<void(T*)>& Callback)

Loads the soft object asynchronously and calls the provided callback with the loaded object cast to type T.

template

T* LoadSynchronous()

Loads the soft object synchronously and returns it cast to type T.

void LoadSynchronous()

Loads the soft object synchronously.

void ReleaseHardRef()

Releases the hard reference held by StrongPtr.

template

operator T()

Casts the loaded object to type T and returns it.

template

T* Get()

Returns a pointer to the loaded object cast to type T.

bool IsValid() const

Checks if the strong pointer is valid (i.e., the object has been successfully loaded).

bool IsNull() const

Checks if the soft pointer is null.

TSoftObjectPtr

SoftObjectPtr() const

Returns a copy of the soft object pointer.

Usage & Implementation Notes

  • This struct uses TSoftObjectPtr and TStrongObjectPtr to manage object references, allowing for asynchronous loading without blocking the main thread.

  • The LoadAsync function can be used with or without a callback, providing flexibility in how the loaded object is handled once it becomes available.

  • The ReleaseHardRef method allows for manual management of the strong reference, which can be useful in scenarios where you need to ensure that the object remains valid for an extended period.

22 May 2026