Navigation
API > API/Runtime > API/Runtime/CoreUObject
A struct that contains a string reference to an object, either a package, a top level asset or a subobject. This can be used to make soft references to assets that are loaded on demand. This is stored internally as an FTopLevelAssetPath pointing to the top level asset (/package/path.assetname) and an optional string subobject path. If the MetaClass metadata is applied to a FProperty with this the UI will restrict to that type of asset.
| Name | FSoftObjectPath |
| Type | struct |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/SoftObjectPath.h |
| Include Path | #include "UObject/SoftObjectPath.h" |
Syntax
USTRUCT (BlueprintType ,
Meta=(HasNativeMake="/Script/Engine.KismetSystemLibrary.MakeSoftObjectPath", HasNativeBreak="/Script/Engine.KismetSystemLibrary.BreakSoftObjectPath"))
struct FSoftObjectPath
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| UObject/SoftObjectPath.h | |||
FSoftObjectPath
(
const FSoftObjectPath& Other |
UObject/SoftObjectPath.h | ||
FSoftObjectPath
(
FSoftObjectPath&& Other |
UObject/SoftObjectPath.h | ||
FSoftObjectPath
(
const FString& Path |
Construct from a path string. Non-explicit for backwards compatibility. | UObject/SoftObjectPath.h | |
FSoftObjectPath
(
FAnsiStringView Path |
UObject/SoftObjectPath.h | ||
FSoftObjectPath
(
const WIDECHAR* Path |
UObject/SoftObjectPath.h | ||
FSoftObjectPath
(
FTopLevelAssetPath InAssetPath |
Explicitly extend a top-level object path with an empty subobject path. | UObject/SoftObjectPath.h | |
FSoftObjectPath
(
TYPE_OF_NULLPTR |
UObject/SoftObjectPath.h | ||
FSoftObjectPath
(
const ANSICHAR* Path |
UObject/SoftObjectPath.h | ||
FSoftObjectPath
(
FName InPackageName, |
UObject/SoftObjectPath.h | ||
FSoftObjectPath
(
FTopLevelAssetPath InAssetPath, |
UObject/SoftObjectPath.h | ||
FSoftObjectPath
(
FTopLevelAssetPath InAssetPath, |
UObject/SoftObjectPath.h | ||
FSoftObjectPath
(
FWideStringView Path |
UObject/SoftObjectPath.h | ||
FSoftObjectPath
(
const FObjectPtr& InObject |
UObject/SoftObjectPath.h | ||
FSoftObjectPath
(
const TObjectPtr< T >& InObject |
UObject/SoftObjectPath.h | ||
FSoftObjectPath
(
const UObject* InObject |
Construct from an existing object in memory | UObject/SoftObjectPath.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FSoftObjectPath() |
UObject/SoftObjectPath.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| NAME_Untracked | FName | Text of the Untracked parameter in a UPROPERTY's meta field, if this parameter is present it marks that the SoftObjectPath reference should not cause the target package to be added to the cook. | UObject/SoftObjectPath.h |
| PIEPackageNames | TSet< FName > | Package names currently being duplicated, needed by FixupForPIE | UObject/SoftObjectPath.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AssetPath | FTopLevelAssetPath | Asset path, patch to a top level object in a package. This is /package/path.assetname | UObject/SoftObjectPath.h | |
| SubPathString | FUtf8String | Optional FString for subobject within an asset. | UObject/SoftObjectPath.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AppendString
(
FUtf8StringBuilderBase& Builder |
UObject/SoftObjectPath.h | ||
void AppendString
(
FStringBuilderBase& Builder |
UObject/SoftObjectPath.h | ||
void AppendString
(
FString& Builder |
Append string representation of reference, in form /package/path.assetname[:subpath] | UObject/SoftObjectPath.h | |
bool ExportTextItem
(
FString& ValueStr, |
UObject/SoftObjectPath.h | ||
bool FastLess
(
const FSoftObjectPath& Other |
Return true if this path appears before Other using fast index-based fname order | UObject/SoftObjectPath.h | |
bool FixupCoreRedirects() |
Fixes soft object path for CoreRedirects to handle renamed native objects, returns true if it was modified | UObject/SoftObjectPath.h | |
bool FixupForPIE
(
TFunctionRef< void(int32, FSoftObjectPath&)> InPreFixupForPIECustomFunction |
Fixes up this SoftObjectPath to add the PIE prefix depending on what is currently active, returns true if it was modified. | UObject/SoftObjectPath.h | |
bool FixupForPIE
(
int32 PIEInstance, |
Fixes up this SoftObjectPath to add the PIE prefix for the given PIEInstance index, returns true if it was modified | UObject/SoftObjectPath.h | |
FName GetAssetFName() |
Returns assetname string, leaving off the /package/path part and sub object | UObject/SoftObjectPath.h | |
FString GetAssetName() |
Returns assetname string, leaving off the /package/path part and sub object | UObject/SoftObjectPath.h | |
FTopLevelAssetPath GetAssetPath() |
Returns the top-level asset part of this path, without the subobject path. | UObject/SoftObjectPath.h | |
FString GetAssetPathString() |
Returns string version of asset path, including both package and asset but not sub object | UObject/SoftObjectPath.h | |
FName GetLongPackageFName() |
Returns /package/path, leaving off the asset name and sub object | UObject/SoftObjectPath.h | |
FString GetLongPackageName() |
Returns /package/path, leaving off the asset name and sub object | UObject/SoftObjectPath.h | |
FString GetSubPathString() |
Returns the sub path, which is often empty | UObject/SoftObjectPath.h | |
const FUtf8String & GetSubPathUtf8String() |
UObject/SoftObjectPath.h | ||
FSoftObjectPath GetWithoutSubPath() |
Returns this path without the SubPath component, restricting the result to a top level asset but keeping the type as FSoftObjectPath in contrast to GetAssetPath. | UObject/SoftObjectPath.h | |
bool ImportTextItem
(
const TCHAR*& Buffer, |
UObject/SoftObjectPath.h | ||
bool IsAsset() |
Check if this represents an asset, meaning it is not null but does not have a sub path | UObject/SoftObjectPath.h | |
bool IsNull() |
Checks to see if this is initialized to null | UObject/SoftObjectPath.h | |
bool IsSubobject() |
Check if this represents a sub object, meaning it has a sub path | UObject/SoftObjectPath.h | |
bool IsValid() |
Check if this could possibly refer to a real object, or was initialized to null | UObject/SoftObjectPath.h | |
bool LexicalLess
(
const FSoftObjectPath& Other |
Return true if this path appears before Other in lexical order | UObject/SoftObjectPath.h | |
int32 LoadAsync
(
FLoadSoftObjectPathAsyncDelegate InCompletionDelegate, |
Attempts to asynchronously load the object referenced by this path. | UObject/SoftObjectPath.h | |
void PostLoadPath
(
FArchive* InArchive |
Handles when a path has been loaded, call if loading with a method that skips SerializePath. | UObject/SoftObjectPath.h | |
bool PreSavePath
(
bool* bReportSoftObjectPathRedirects |
Fixes up path for saving, call if saving with a method that skips SerializePath. | UObject/SoftObjectPath.h | |
| Remap the package to handle renames. | UObject/SoftObjectPath.h | ||
void Reset() |
Resets reference to point to null | UObject/SoftObjectPath.h | |
UObject * ResolveObject() |
Attempts to find a currently loaded object that matches this path | UObject/SoftObjectPath.h | |
| Struct overrides | UObject/SoftObjectPath.h | ||
bool Serialize
(
FStructuredArchive::FSlot Slot |
UObject/SoftObjectPath.h | ||
bool SerializeFromMismatchedTag
(
FPropertyTag const& Tag, |
UObject/SoftObjectPath.h | ||
void SerializePath
(
FArchive& Ar |
Serializes the internal path and also handles save/PIE fixups. | UObject/SoftObjectPath.h | |
void SerializePathWithoutFixup
(
FArchive& Ar |
Serializes the internal path without any save/PIE fixups. | UObject/SoftObjectPath.h | |
void SetPath
(
const FTopLevelAssetPath& InAssetPath |
Sets asset path of this reference based on a string path | UObject/SoftObjectPath.h | |
void SetPath
(
FWideStringView Path |
UObject/SoftObjectPath.h | ||
void SetPath
(
FAnsiStringView Path |
UObject/SoftObjectPath.h | ||
void SetPath
(
FUtf8StringView Path |
UObject/SoftObjectPath.h | ||
| UObject/SoftObjectPath.h | |||
void SetPath
(
const WIDECHAR* Path |
UObject/SoftObjectPath.h | ||
void SetPath
(
const ANSICHAR* Path |
UObject/SoftObjectPath.h | ||
| UObject/SoftObjectPath.h | |||
void SetPath
(
const FTopLevelAssetPath& InAssetPath, |
UObject/SoftObjectPath.h | ||
void SetPath
(
const FTopLevelAssetPath& InAssetPath, |
UObject/SoftObjectPath.h | ||
void SetSubPathString
(
TStringOverload< FWideString > InSubPathString |
UObject/SoftObjectPath.h | ||
void SetSubPathString
(
TStringOverload< FUtf8String > InSubPathString |
UObject/SoftObjectPath.h | ||
| Returns string representation of reference, in form /package/path.assetname[:subpath] | UObject/SoftObjectPath.h | ||
void ToString
(
FUtf8StringBuilderBase& Builder |
UObject/SoftObjectPath.h | ||
void ToString
(
FStringBuilderBase& Builder |
Append string representation of reference, in form /package/path.assetname[:subpath] | UObject/SoftObjectPath.h | |
UObject * TryLoad
(
FUObjectSerializeContext* InLoadContext |
Attempts to load the asset, this will call LoadObject which can be very slow | UObject/SoftObjectPath.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddPIEPackageName
(
FName NewPIEPackageName |
Adds list of packages names that have been created specifically for PIE, this is used for editor fixup | UObject/SoftObjectPath.h | |
static void ClearPIEPackageNames() |
Disables special PIE path handling, call when PIE finishes to clear list | UObject/SoftObjectPath.h | |
static FSoftObjectPath ConstructFromAssetPath
(
FTopLevelAssetPath InAssetPath |
UObject/SoftObjectPath.h | ||
static FSoftObjectPath ConstructFromAssetPathAndSubpath
(
FTopLevelAssetPath InAssetPath, |
UObject/SoftObjectPath.h | ||
static FSoftObjectPath ConstructFromAssetPathAndSubpath
(
FTopLevelAssetPath InAssetPath, |
UObject/SoftObjectPath.h | ||
static FSoftObjectPath ConstructFromObject
(
const TObjectPtr< T >& InObject |
UObject/SoftObjectPath.h | ||
static FSoftObjectPath ConstructFromObject
(
const FObjectPtr& InObject |
UObject/SoftObjectPath.h | ||
static FSoftObjectPath ConstructFromObject
(
const UObject* InObject |
UObject/SoftObjectPath.h | ||
static FSoftObjectPath ConstructFromPackageAsset
(
FName InPackageName, |
UObject/SoftObjectPath.h | ||
static FSoftObjectPath ConstructFromPackageAssetSubpath
(
FName InPackageName, |
Static methods for more meaningful construction sites. | UObject/SoftObjectPath.h | |
static FSoftObjectPath ConstructFromStringPath
(
FStringView InPath |
UObject/SoftObjectPath.h | ||
static FSoftObjectPath ConstructFromStringPath
(
FString&& InPath |
UObject/SoftObjectPath.h | ||
static FSoftObjectPath ConstructFromStringPath
(
FUtf8StringView InPath |
UObject/SoftObjectPath.h | ||
static FSoftObjectPath GetOrCreateIDForObject
(
FObjectPtr Object |
UObject/SoftObjectPath.h | ||
static FSoftObjectPath GetOrCreateIDForObject
(
const UObject* Object |
UObject/SoftObjectPath.h | ||
static FSoftObjectPath GetOrCreateIDForObject
(
TObjectPtr< T > Object |
UObject/SoftObjectPath.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
FSoftObjectPath const& Other |
UObject/SoftObjectPath.h | ||
FSoftObjectPath & operator=
(
const FString& Path |
UObject/SoftObjectPath.h | ||
FSoftObjectPath & operator=
(
TYPE_OF_NULLPTR |
UObject/SoftObjectPath.h | ||
FSoftObjectPath & operator=
(
const ANSICHAR* Path |
UObject/SoftObjectPath.h | ||
FSoftObjectPath & operator=
(
const WIDECHAR* Path |
UObject/SoftObjectPath.h | ||
FSoftObjectPath & operator=
(
FAnsiStringView Path |
UObject/SoftObjectPath.h | ||
FSoftObjectPath & operator=
(
FWideStringView Path |
UObject/SoftObjectPath.h | ||
FSoftObjectPath & operator=
(
const FTopLevelAssetPath Path |
UObject/SoftObjectPath.h | ||
FSoftObjectPath & operator=
(
const FSoftObjectPath& Path |
UObject/SoftObjectPath.h | ||
FSoftObjectPath & operator=
(
FSoftObjectPath&& Path |
UObject/SoftObjectPath.h | ||
bool operator==
(
FSoftObjectPath const& Other |
UObject/SoftObjectPath.h |