Navigation
Unreal Engine C++ API Reference > Runtime > CoreUObject > UObject
Inheritance Hierarchy
- FSoftObjectPath
- FSoftClassPath
References
Module | CoreUObject |
Header | /Engine/Source/Runtime/CoreUObject/Public/UObject/SoftObjectPath.h |
Include | #include "UObject/SoftObjectPath.h" |
Syntax
struct FSoftObjectPath
Remarks
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.
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
|||
![]() |
|||
![]() |
FSoftObjectPath
(
FName Path |
||
![]() |
FSoftObjectPath
(
const TObjectPtr< T >& InObject |
||
![]() |
FSoftObjectPath
(
const FObjectPtr& InObject |
||
![]() |
FSoftObjectPath
(
const UObject* InObject |
Construct from an existing object in memory | |
![]() |
FSoftObjectPath
(
FTopLevelAssetPath InAssetPath, |
||
![]() |
FSoftObjectPath
(
FName InAssetPathName, |
Construct from an asset FName and subobject pair | |
![]() |
FSoftObjectPath
(
FName InPackageName, |
||
![]() |
FSoftObjectPath
(
const FSoftObjectPath& Other |
||
![]() |
FSoftObjectPath
(
FSoftObjectPath&& Other |
||
![]() |
FSoftObjectPath
(
const FString& Path |
Construct from a path string. Non-explicit for backwards compatibility. | |
![]() |
FSoftObjectPath
(
FTopLevelAssetPath InAssetPath |
Explicitly extend a top-level object path with an empty subobject path. | |
![]() |
FSoftObjectPath
(
FWideStringView Path |
||
![]() |
FSoftObjectPath
(
FAnsiStringView Path |
||
![]() |
FSoftObjectPath
(
const WIDECHAR* Path |
||
![]() |
FSoftObjectPath
(
const ANSICHAR* Path |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | AddPIEPackageName
(
FName NewPIEPackageName |
Adds list of packages names that have been created specifically for PIE, this is used for editor fixup |
![]() ![]() |
void | AppendString
(
FStringBuilderBase& Builder |
|
![]() ![]() |
void | AppendString
(
FString& Builder |
Append string representation of reference, in form /package/path.assetname[:subpath] |
![]() ![]() |
void | Disables special PIE path handling, call when PIE finishes to clear list | |
![]() ![]() |
bool | ExportTextItem
(
FString& ValueStr, |
|
![]() ![]() |
bool | FastLess
(
const FSoftObjectPath& Other |
Return true if this path appears before Other using fast index-based fname order |
![]() |
bool | Fixes soft object path for CoreRedirects to handle renamed native objects, returns true if it was modified | |
![]() |
bool | FixupForPIE
(
int32 PIEInstance, |
Fixes up this SoftObjectPath to add the PIE prefix for the given PIEInstance index, returns true if it was modified |
![]() |
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. |
![]() ![]() |
FName | Returns assetname string, leaving off the /package/path part and sub object | |
![]() ![]() |
FString | GetAssetName () |
Returns assetname string, leaving off the /package/path part and sub object |
![]() ![]() |
FTopLevelAssetPath | GetAssetPath () |
Returns the top-level asset part of this path, without the subobject path. |
![]() ![]() |
FName | Returns the entire asset path as an FName, including both package and asset but not sub object | |
![]() ![]() |
FString | Returns string version of asset path, including both package and asset but not sub object | |
![]() ![]() |
int32 | ||
![]() ![]() |
FName | Returns /package/path, leaving off the asset name and sub object | |
![]() ![]() |
FString | Returns /package/path, leaving off the asset name and sub object | |
![]() ![]() |
FSoftObjectPath | GetOrCreateIDForObject
(
const UObject* Object |
|
![]() ![]() |
const FString & | Returns the sub path, which is often empty | |
![]() ![]() |
FSoftObjectPath | 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. | |
![]() |
bool | ImportTextItem
(
const TCHAR*& Buffer, |
|
![]() ![]() |
int32 | ||
![]() ![]() |
bool | IsAsset () |
Check if this represents an asset, meaning it is not null but does not have a sub path |
![]() ![]() |
bool | IsNull () |
Checks to see if this is initialized to null |
![]() ![]() |
bool | IsSubobject () |
Check if this represents a sub object, meaning it has a sub path |
![]() ![]() |
bool | IsValid () |
Check if this could possibly refer to a real object, or was initialized to null |
![]() ![]() |
bool | LexicalLess
(
const FSoftObjectPath& Other |
Return true if this path appears before Other in lexical order |
![]() ![]() |
void | PostLoadPath
(
FArchive* InArchive |
Handles when a path has been loaded, call if loading with a method that skips SerializePath. |
![]() |
bool | PreSavePath
(
bool* bReportSoftObjectPathRedirects |
Fixes up path for saving, call if saving with a method that skips SerializePath. |
![]() |
void | Reset () |
Resets reference to point to null |
![]() ![]() |
UObject * | Attempts to find a currently loaded object that matches this path | |
![]() |
bool | Struct overrides | |
![]() |
bool | Serialize
(
FStructuredArchive::FSlot Slot |
|
![]() |
bool | SerializeFromMismatchedTag
(
FPropertyTag const& Tag, |
|
![]() |
void | SerializePath
(
FArchive& Ar |
Serializes the internal path and also handles save/PIE fixups. |
![]() |
void | SerializePathWithoutFixup
(
FArchive& Ar |
Serializes the internal path without any save/PIE fixups. |
![]() |
void | SetAssetPathName
(
FName InAssetPathName |
|
![]() |
void | SetPath
(
FWideStringView Path |
|
![]() |
void | SetPath
(
FAnsiStringView Path |
|
![]() |
void | SetPath
(
FUtf8StringView Path |
|
![]() |
void | ||
![]() |
void | ||
![]() |
void | ||
![]() |
void | ||
![]() |
void | SetPath
(
const FTopLevelAssetPath& InAssetPath, |
Sets asset path of this reference based on a string path |
![]() |
void | SetSubPathString
(
const FString& InSubPathString |
|
![]() ![]() |
FName | ToFName () |
|
![]() ![]() |
FString | ToString () |
Returns string representation of reference, in form /package/path.assetname[:subpath] |
![]() ![]() |
void | ToString
(
FStringBuilderBase& Builder |
Append string representation of reference, in form /package/path.assetname[:subpath] |
![]() ![]() |
UObject * | TryLoad
(
FUObjectSerializeContext* InLoadContext |
Attempts to load the asset, this will call LoadObject which can be very slow |
Operators
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
bool | operator!=
(
FSoftObjectPath const& Other |
|
![]() |
FSoftObjectPath & | ||
![]() |
FSoftObjectPath & | operator=
(
FWideStringView Path |
|
![]() |
FSoftObjectPath & | ||
![]() |
FSoftObjectPath & | operator=
(
const FTopLevelAssetPath Path |
|
![]() |
FSoftObjectPath & | operator=
(
FSoftObjectPath&& Path |
|
![]() |
FSoftObjectPath & | operator=
(
const FSoftObjectPath& Path |
|
![]() |
FSoftObjectPath & | ||
![]() |
FSoftObjectPath & | ||
![]() |
FSoftObjectPath & | ||
![]() |
FSoftObjectPath & | operator=
(
FAnsiStringView Path |
|
![]() ![]() |
bool | operator==
(
FSoftObjectPath const& Other |
Constants
Name | Description |
---|---|
PIEPackageNames | Package names currently being duplicated, needed by FixupForPIE |