Navigation
API > API/Runtime > API/Runtime/CoreUObject
TSoftClassPtr is a templatized wrapper around FSoftObjectPtr that works like a TSubclassOf, it can be used in UProperties for blueprint subclasses
| Name | TSoftClassPtr |
| Type | class |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/SoftObjectPtr.h |
| Include Path | #include "UObject/SoftObjectPtr.h" |
Syntax
template<class TClass>
class TSoftClassPtr
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TSoftClassPtr
(
const UClass* From |
Construct from a class already in memory | UObject/SoftObjectPtr.h | |
| UObject/SoftObjectPtr.h | |||
TSoftClassPtr
(
const TSoftClassPtr& Other |
UObject/SoftObjectPtr.h | ||
TSoftClassPtr
(
TSoftClassPtr&& Other |
UObject/SoftObjectPtr.h | ||
TSoftClassPtr
(
const TSoftClassPtr< TClassA >& Other |
Construct from another soft pointer | UObject/SoftObjectPtr.h | |
TSoftClassPtr
(
const FSoftObjectPath& ObjectPath |
Construct from a soft object path | UObject/SoftObjectPtr.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TSoftClassPtr() |
UObject/SoftObjectPtr.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ElementType | TClass | 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 |
|---|---|---|---|
UClass * 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 | |
UClass * 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 | |
bool operator!=
(
const TSoftClassPtr& Other |
Compare soft pointers for inequality Caution: Two soft pointers might not be equal to each other, but they both might return nullptr | UObject/SoftObjectPtr.h | |
UClass & operator*() |
Dereference the soft pointer | UObject/SoftObjectPtr.h | |
TSoftClassPtr & operator=
(
const TSoftObjectPtr< TClassA >& Other |
Copy from another soft pointer | UObject/SoftObjectPtr.h | |
TSoftClassPtr & operator=
(
const TWeakObjectPtr< TClassA >& Other |
Copy from a weak pointer already in memory | UObject/SoftObjectPtr.h | |
void operator=
(
const FSoftObjectPath& ObjectPath |
Copy from a soft object path | UObject/SoftObjectPtr.h | |
| Copy from a class already in memory | UObject/SoftObjectPtr.h | ||
TSoftClassPtr & operator=
(
TSoftClassPtr&& Other |
UObject/SoftObjectPtr.h | ||
TSoftClassPtr & operator=
(
const TSoftClassPtr& Other |
UObject/SoftObjectPtr.h | ||
bool operator==
(
const TSoftClassPtr& Other |
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 | |
UClass * operator->() |
Dereference the soft pointer | UObject/SoftObjectPtr.h |