FSoftObjectPath::ExportTextItem
#include "UObject/SoftObjectPath.h"
Access: public
Specifiers: const
Description
Serializes the soft object path to a human-readable string for use in property copy/paste, config files, and T3D export.
Caveats & Gotchas
- • This is called automatically by UE's property system; you rarely need to invoke it directly. Manually calling it bypasses the normal property change notifications that higher-level code may rely on.
- • The output format is the full long package path (e.g. `/Game/Folder/Asset.Asset`) — not a display name. Parsing the result back requires ImportTextItem, not a simple string comparison.
Signature
COREUOBJECT_API bool ExportTextItem(FString& ValueStr, FSoftObjectPath const& DefaultValue, UObject* Parent, int32 PortFlags, UObject* ExportRootScope) const Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| ValueStr | FString& | Output string that receives the exported text representation. | — |
| DefaultValue | FSoftObjectPath const& | The default value to compare against; if equal, no output may be written depending on PortFlags. | — |
| Parent | UObject* | The outer object context used for relative path resolution. | — |
| PortFlags | int32 | Combination of EPropertyPortFlags that controls export behaviour (e.g. PPF_ExportCpp). | — |
| ExportRootScope | UObject* | Root scope object for determining which objects can be referenced relatively. | — |
Return Type
bool Example
Export a path to string for debugging C++
FSoftObjectPath Path(TEXT("/Game/Assets/MyMesh.MyMesh"));
FString Exported;
Path.ExportTextItem(Exported, FSoftObjectPath(), nullptr, PPF_None, nullptr);
UE_LOG(LogTemp, Log, TEXT("Path as text: %s"), *Exported); Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?