RealDocs

UKismetSystemLibrary::GetSoftObjectPath

function Engine Blueprint Since unknown
#include "Kismet/KismetSystemLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintPure

Description

Returns the full path to the specified object as an FSoftObjectPath, suitable for storing and later resolving asynchronously via the asset system.

Caveats & Gotchas

  • For a world-placed actor or other non-asset object, the returned path is only valid while that object exists in the current world — it's not a stable reference you can save to disk and resolve after the level is reloaded, unlike a path to a persistent asset.
  • Passing a null Object constructs an empty FSoftObjectPath rather than erroring; check IsValid() on the result if you need to distinguish that case.

Signature

static FSoftObjectPath GetSoftObjectPath(const UObject* Object)

Parameters

Name Type Description Default
Object const UObject* The object to get a soft path for.

Return Type

FSoftObjectPath

Example

Capture a soft reference to an asset object C++
FSoftObjectPath Path = UKismetSystemLibrary::GetSoftObjectPath(MyTexture);
TSoftObjectPtr<UTexture2D> SoftRef(Path);

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.