Navigation
API > API/Runtime > API/Runtime/CoreUObject
TSoftObjectPtr is templatized wrapper of the generic FSoftObjectPtr, it can be used in UProperties
| Name | TSoftObjectPtr |
| Type | struct |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/SoftObjectPtr.h |
| Include Path | #include "UObject/SoftObjectPtr.h" |
Syntax
template<class T>
struct TSoftObjectPtr
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TSoftObjectPtr
(
TYPE_OF_NULLPTR |
Construct from a nullptr | UObject/SoftObjectPtr.h | |
TSoftObjectPtr
(
const TObjectPtr< U > Object |
UObject/SoftObjectPtr.h | ||
TSoftObjectPtr
(
const TObjectPtr< U > Object |
Construct from a TObjectPtr which may or may not be in memory. | UObject/SoftObjectPtr.h | |
TSoftObjectPtr
(
U* Object |
UObject/SoftObjectPtr.h | ||
TSoftObjectPtr
(
U* Object |
Construct from an object already in memory | UObject/SoftObjectPtr.h | |
TSoftObjectPtr
(
TSoftObjectPtr< U >&& Other |
UObject/SoftObjectPtr.h | ||
TSoftObjectPtr
(
const TSoftObjectPtr< U >& Other |
Construct from another soft pointer | UObject/SoftObjectPtr.h | |
TSoftObjectPtr
(
const TSoftObjectPtr< U >& Other |
UObject/SoftObjectPtr.h | ||
TSoftObjectPtr
(
TSoftObjectPtr&& Other |
UObject/SoftObjectPtr.h | ||
TSoftObjectPtr
(
const TSoftObjectPtr& Other |
UObject/SoftObjectPtr.h | ||
| UObject/SoftObjectPtr.h | |||
TSoftObjectPtr
(
SoftObjectPathType ObjectPath |
Construct from a soft object path | UObject/SoftObjectPtr.h | |
TSoftObjectPtr
(
TSoftObjectPtr< U >&& Other |
Construct from a moveable soft pointer | UObject/SoftObjectPtr.h | |
TSoftObjectPtr
(
const FString& Path |
UObject/SoftObjectPtr.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TSoftObjectPtr() |
UObject/SoftObjectPtr.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ElementType | T | UObject/SoftObjectPtr.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| SoftObjectPtr | FSoftObjectPtr | UObject/SoftObjectPtr.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
T * Get () |
Dereference the soft pointer. | UObject/SoftObjectPtr.h | |
FString GetAssetName() |
Returns assetname string, leaving off the /package/path part | UObject/SoftObjectPtr.h | |
FName GetLongPackageFName() |
Returns /package/path name, leaving off the asset name | UObject/SoftObjectPtr.h | |
FString GetLongPackageName() |
Returns /package/path string, leaving off the asset name | UObject/SoftObjectPtr.h | |
uint32 GetPtrTypeHash() |
Hash function | UObject/SoftObjectPtr.h | |
const FSoftObjectPath & GetUniqueID() |
Returns the StringObjectPath that is wrapped by this SoftObjectPtr | UObject/SoftObjectPtr.h | |
bool IsNull() |
Test if this can never point to a live UObject | UObject/SoftObjectPtr.h | |
bool IsPending() |
Test if this does not point to a live UObject, but may in the future | UObject/SoftObjectPtr.h | |
bool IsValid() |
Test if this points to a live UObject | UObject/SoftObjectPtr.h | |
int32 LoadAsync
(
FLoadSoftObjectPathAsyncDelegate InCompletionDelegate, |
Attempts to asynchronously load the object referenced by this soft pointer. | UObject/SoftObjectPtr.h | |
T * LoadSynchronous() |
Synchronously load (if necessary) and return the asset object represented by this asset ptr | UObject/SoftObjectPtr.h | |
void Reset() |
Reset the soft pointer back to the null state | UObject/SoftObjectPtr.h | |
void ResetWeakPtr() |
Resets the weak ptr only, call this when ObjectId may change | UObject/SoftObjectPtr.h | |
void Serialize
(
FArchive& Ar |
UObject/SoftObjectPtr.h | ||
const FSoftObjectPath & ToSoftObjectPath() |
Returns the StringObjectPath that is wrapped by this SoftObjectPtr | UObject/SoftObjectPtr.h | |
FString ToString() |
Returns string representation of reference, in form /package/path.assetname | UObject/SoftObjectPtr.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
operator bool() |
Dereference soft pointer to see if it points somewhere valid | UObject/SoftObjectPtr.h | |
T & operator*() |
Dereference the soft pointer | UObject/SoftObjectPtr.h | |
TSoftObjectPtr & operator=
(
TSoftObjectPtr< U > Other |
UObject/SoftObjectPtr.h | ||
TSoftObjectPtr & operator=
(
TSoftObjectPtr< U > Other |
Copy from another soft pointer | UObject/SoftObjectPtr.h | |
TSoftObjectPtr & operator=
(
const TWeakObjectPtr< U >& Other |
UObject/SoftObjectPtr.h | ||
TSoftObjectPtr & operator=
(
const TWeakObjectPtr< U >& Other |
Copy from a weak pointer to an object already in memory | UObject/SoftObjectPtr.h | |
TSoftObjectPtr & operator=
(
FSoftObjectPath ObjectPath |
Copy from a soft object path | UObject/SoftObjectPtr.h | |
TSoftObjectPtr & operator=
(
TYPE_OF_NULLPTR |
Assign from a nullptr | UObject/SoftObjectPtr.h | |
TSoftObjectPtr & operator=
(
const TObjectPtr< U > Object |
Copy from a TObjectPtr which may or may not be in memory. | UObject/SoftObjectPtr.h | |
TSoftObjectPtr & operator=
(
U* Object |
UObject/SoftObjectPtr.h | ||
TSoftObjectPtr & operator=
(
const TObjectPtr< U > Object |
UObject/SoftObjectPtr.h | ||
TSoftObjectPtr & operator=
(
TSoftObjectPtr&& Other |
UObject/SoftObjectPtr.h | ||
TSoftObjectPtr & operator=
(
const TSoftObjectPtr& Other |
UObject/SoftObjectPtr.h | ||
TSoftObjectPtr & operator=
(
U* Object |
Copy from an object already in memory | UObject/SoftObjectPtr.h | |
bool operator==
(
U* Rhs |
UObject/SoftObjectPtr.h | ||
bool operator==
(
U* Rhs |
UObject/SoftObjectPtr.h | ||
bool operator==
(
const TSoftObjectPtr< U >& Rhs |
UObject/SoftObjectPtr.h | ||
bool operator==
(
const TSoftObjectPtr< U >& Rhs |
UObject/SoftObjectPtr.h | ||
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 | UObject/SoftObjectPtr.h | |
bool operator==
(
TYPE_OF_NULLPTR |
UObject/SoftObjectPtr.h | ||
T * operator->() |
Dereference the soft pointer | UObject/SoftObjectPtr.h |