Navigation
API > API/Runtime > API/Runtime/CoreUObject > API/Runtime/CoreUObject/UObject
References
| Module | CoreUObject |
| Header | /Engine/Source/Runtime/CoreUObject/Public/UObject/SoftObjectPtr.h |
| Include | #include "UObject/SoftObjectPtr.h" |
Syntax
template<class T>
struct TSoftObjectPtr
Remarks
TSoftObjectPtr is templatized wrapper of the generic FSoftObjectPtr, it can be used in UProperties
Constructors
| Type | Name | Description | |
|---|---|---|---|
TSoftObjectPtr
(
const TObjectPtr< U > Object |
Construct from a TObjectPtr which may or may not be in memory. | ||
TSoftObjectPtr
(
const TObjectPtr< U > Object |
|||
| Construct from a nullptr | |||
TSoftObjectPtr
(
SoftObjectPathType ObjectPath |
Construct from a soft object path | ||
TSoftObjectPtr
(
const FString& Path |
|||
TSoftObjectPtr
(
const TSoftObjectPtr& Other |
|||
TSoftObjectPtr
(
TSoftObjectPtr&& Other |
|||
TSoftObjectPtr
(
const TSoftObjectPtr< U >& Other |
Construct from another soft pointer | ||
TSoftObjectPtr
(
const TSoftObjectPtr< U >& Other |
|||
TSoftObjectPtr
(
TSoftObjectPtr< U >&& Other |
Construct from a moveable soft pointer | ||
TSoftObjectPtr
(
TSoftObjectPtr< U >&& Other |
|||
TSoftObjectPtr
(
U* Object |
Construct from an object already in memory | ||
TSoftObjectPtr
(
U* Object |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| T * | Get () |
Dereference the soft pointer. | |
| FString | GetAssetName () |
Returns assetname string, leaving off the /package/path part | |
| FName | Returns /package/path name, leaving off the asset name | ||
| FString | Returns /package/path string, leaving off the asset name | ||
| uint32 | Hash function | ||
| const FSoftObjectPath & | GetUniqueID () |
Returns the StringObjectPath that is wrapped by this SoftObjectPtr | |
| bool | IsNull () |
Test if this can never point to a live UObject | |
| bool | IsPending () |
Test if this does not point to a live UObject, but may in the future | |
| bool | IsValid () |
Test if this points to a live UObject | |
| T * | Synchronously load (if necessary) and return the asset object represented by this asset ptr | ||
| void | Reset () |
Reset the soft pointer back to the null state | |
| void | ResetWeakPtr () |
Resets the weak ptr only, call this when ObjectId may change | |
| void | |||
| 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 | |
|---|---|---|---|
| Dereference soft pointer to see if it points somewhere valid | |||
| T & | operator* () |
Dereference the soft pointer | |
| TSoftObjectPtr & | operator=
(
TSoftObjectPtr< U > Other |
||
| TSoftObjectPtr & | operator=
(
TSoftObjectPtr< U > Other |
Copy from another soft pointer | |
| TSoftObjectPtr & | operator=
(
const TWeakObjectPtr< U >& Other |
||
| TSoftObjectPtr & | operator=
(
const TWeakObjectPtr< U >& Other |
Copy from a weak pointer to an object already in memory | |
| TSoftObjectPtr & | operator=
(
FSoftObjectPath ObjectPath |
Copy from a soft object path | |
| TSoftObjectPtr & | operator=
(
const TObjectPtr< U > Object |
||
| TSoftObjectPtr & | operator=
(
const TObjectPtr< U > Object |
Copy from a TObjectPtr which may or may not be in memory. | |
| TSoftObjectPtr & | operator=
(
U* Object |
||
| TSoftObjectPtr & | Assign from a nullptr | ||
| TSoftObjectPtr & | operator=
(
TSoftObjectPtr&& Other |
||
| TSoftObjectPtr & | operator=
(
const TSoftObjectPtr& Other |
||
| TSoftObjectPtr & | operator=
(
U* Object |
Copy from an object already in memory | |
| bool | operator==
(
U* Rhs |
||
| bool | operator==
(
U* Rhs |
||
| bool | operator==
(
const TSoftObjectPtr< U >& Rhs |
||
| bool | operator==
(
const TSoftObjectPtr< U >& Rhs |
||
| bool | operator==
(
const TSoftObjectPtr& Rhs |
Compare soft pointers for equality Caution: Two soft pointers might not be equal to each other, but they both might return nullptr | |
| bool | |||
| T * | operator-> () |
Dereference the soft pointer |
Typedefs
| Name | Description |
|---|---|
| ElementType |