A struct that contains a string reference to an object, either a top level asset or a subobject. 更多...
#include <SoftObjectPath.h>
类 FSoftObjectPath 继承关系图:Public 成员函数 | |
| bool | FixupCoreRedirects () |
| Fixes soft object path for CoreRedirects to handle renamed native objects, returns true if it was modified | |
| bool | FixupForPIE () |
| Fixes up this SoftObjectPath to add the PIE prefix depending on what is currently active, 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 | |
| FSoftObjectPath (const FSoftObjectPath &Other) | |
| Construct from another soft object path | |
| FSoftObjectPath (const FString &Path) | |
| Construct from a path string. 更多... | |
| FSoftObjectPath (const UObject *InObject) | |
| Construct from an existing object in memory | |
| FSoftObjectPath (FName InAssetPathName, FString InSubPathString) | |
| Construct from an asset FName and subobject pair | |
| FSoftObjectPath (FSoftObjectPath &&Other) | |
| Construct from a moveable soft object path | |
| FString | GetAssetName () const |
| Returns assetname string, leaving off the /package/path part and sub object | |
| FORCEINLINE FName | GetAssetPathName () const |
| Returns the entire asset path as an FName, including both package and asset but not sub object | |
| FORCEINLINE FString | GetAssetPathString () const |
| Returns string version of asset path, including both package and asset but not sub object | |
| FString | GetLongPackageName () const |
| Returns /package/path, leaving off the asset name and sub object | |
| FORCEINLINE const FString & | GetSubPathString () const |
| Returns the sub path, which is often empty | |
| FORCEINLINE bool | IsAsset () const |
| Check if this represents an asset, meaning it is not null but does not have a sub path | |
| FORCEINLINE bool | IsNull () const |
| Checks to see if this is initialized to null | |
| FORCEINLINE bool | IsSubobject () const |
| Check if this represents a sub object, meaning it has a sub path | |
| FORCEINLINE bool | IsValid () const |
| Check if this could possibly refer to a real object, or was initialized to null | |
| void | PostLoadPath (FArchive *InArchive) const |
| Handles when a path has been loaded, call if loading with a method that skips SerializePath. 更多... | |
| bool | PreSavePath (bool *bReportSoftObjectPathRedirects=nullptr) |
| Fixes up path for saving, call if saving with a method that skips SerializePath. 更多... | |
| void | Reset () |
| Resets reference to point to null | |
| UObject * | ResolveObject () const |
| Attempts to find a currently loaded object that matches this path 更多... | |
| bool | Serialize (FArchive &Ar) |
| Struct overrides | |
| void | SerializePath (FArchive &Ar) |
| Serializes the internal path and also handles save/PIE fixups. 更多... | |
| void | SetPath (FWideStringView Path) |
| Sets asset path of this reference based on a string path | |
| FString | ToString () const |
| Returns string representation of reference, in form /package/path.assetname[:subpath] | |
| void | ToString (FStringBuilderBase &Builder) const |
| Append string representation of reference, in form /package/path.assetname[:subpath] | |
| UObject * | TryLoad (FUObjectSerializeContext *InLoadContext=nullptr) const |
| Attempts to load the asset, this will call LoadObject which can be very slow 更多... | |
静态 Public 成员函数 | |
| static void | AddPIEPackageName (FName NewPIEPackageName) |
| Adds list of packages names that have been created specifically for PIE, this is used for editor fixup | |
| static void | ClearPIEPackageNames () |
| Disables special PIE path handling, call when PIE finishes to clear list | |
| static int32 | GetCurrentTag () |
| Code needed by FSoftObjectPtr internals | |
A struct that contains a string reference to an object, either 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 FName pointing to the top level asset (/package/path.assetname) and an option a string subobject path. If the MetaClass metadata is applied to a FProperty with this the UI will restrict to that type of asset.
|
inline |
Construct from a path string.
Non-explicit for backwards compatibility.
| bool FSoftObjectPath::FixupForPIE | ( | ) |
Fixes up this SoftObjectPath to add the PIE prefix depending on what is currently active, returns true if it was modified.
The overload that takes an explicit PIE instance is preferred, if it's available.
| void FSoftObjectPath::PostLoadPath | ( | FArchive * | InArchive | ) | const |
Handles when a path has been loaded, call if loading with a method that skips SerializePath.
This does not modify path but might call callbacks
| InArchive | The archive that loaded this path |
| bool FSoftObjectPath::PreSavePath | ( | bool * | bReportSoftObjectPathRedirects = nullptr | ) |
Fixes up path for saving, call if saving with a method that skips SerializePath.
This can modify the path, it will return true if it was modified
| UObject * FSoftObjectPath::ResolveObject | ( | ) | const |
Attempts to find a currently loaded object that matches this path
| void FSoftObjectPath::SerializePath | ( | FArchive & | Ar | ) |
Serializes the internal path and also handles save/PIE fixups.
Call this from the archiver overrides
| UObject * FSoftObjectPath::TryLoad | ( | FUObjectSerializeContext * | InLoadContext = nullptr | ) | const |
Attempts to load the asset, this will call LoadObject which can be very slow
| InLoadContext | Optional load context when called from nested load callstack |