Navigation
Unreal Engine C++ API Reference > Runtime > CoreUObject > UObject
Inheritance Hierarchy
- TPersistentObjectPtr
- FSoftObjectPtr
References
Module | CoreUObject |
Header | /Engine/Source/Runtime/CoreUObject/Public/UObject/SoftObjectPtr.h |
Include | #include "UObject/SoftObjectPtr.h" |
Syntax
struct FSoftObjectPtr : public TPersistentObjectPtr< FSoftObjectPath >
Remarks
FSoftObjectPtr is a type of weak pointer to a UObject, that also keeps track of the path to the object on disk. It will change back and forth between being Valid and Pending as the referenced object loads or unloads. It has no impact on if the object is garbage collected or not.
This is useful to specify assets that you may want to asynchronously load on demand.
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
|||
![]() |
FSoftObjectPtr
(
const FSoftObjectPtr& Other |
||
![]() |
FSoftObjectPtr
(
FSoftObjectPtr&& Other |
||
![]() |
FSoftObjectPtr
(
const FSoftObjectPath& ObjectPath |
||
![]() |
FSoftObjectPtr
(
const UObject* Object |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
UObject * | Get () |
Overridden to deal with PIE lookups |
![]() ![]() |
FString | GetAssetName () |
Returns assetname string, leaving off the /package/path. part |
![]() ![]() |
FString | Returns /package/path string, leaving off the asset name | |
![]() ![]() |
UObject * | Synchronously load (if necessary) and return the asset object represented by this asset ptr | |
![]() ![]() |
const FSoftObjectPath & | Returns the StringObjectPath that is wrapped by this SoftObjectPtr | |
![]() ![]() |
FString | ToString () |
Returns string representation of reference, in form /package/path.assetname |
Operators
Type | Name | Description | |
---|---|---|---|
![]() |
FSoftObjectPtr & | operator=
(
const FSoftObjectPtr& Other |
|
![]() |
FSoftObjectPtr & | operator=
(
FSoftObjectPtr&& Other |