Navigation
API > API/Runtime > API/Runtime/CoreUObject
Template to allow UClass types to be passed around with type safety
| Name | TSubclassOf |
| Type | class |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/Templates/SubclassOf.h |
| Include Path | #include "Templates/SubclassOf.h" |
Syntax
template<typename T>
class TSubclassOf
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TSubclassOf
(
U&& From |
Construct from a UClass* (or something implicitly convertible to it) | Templates/SubclassOf.h | |
TSubclassOf () |
Templates/SubclassOf.h | ||
TSubclassOf
(
TSubclassOf&& |
Templates/SubclassOf.h | ||
TSubclassOf
(
const TSubclassOf& |
Templates/SubclassOf.h | ||
TSubclassOf
(
UClass* From |
Constructor that takes a UClass*. | Templates/SubclassOf.h | |
TSubclassOf
(
const TSubclassOf< OtherT >& Other |
Construct from another TSubclassOf, only if types are compatible | Templates/SubclassOf.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TSubclassOf() |
Templates/SubclassOf.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ElementType | T | Templates/SubclassOf.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Class | TObjectPtr< UClass > | Templates/SubclassOf.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| This is a DEVELOPMENT ONLY debugging function and should not be relied upon. | Templates/SubclassOf.h | ||
UClass * Get() |
Dereference back into a UClass*, does runtime type checking. | Templates/SubclassOf.h | |
T * GetDefaultObject() |
Get the CDO if we are referencing a valid class | Templates/SubclassOf.h | |
TObjectPtr< UClass > & GetGCPtr() |
Templates/SubclassOf.h | ||
| Templates/SubclassOf.h | |||
void Serialize
(
FStructuredArchiveSlot& Slot |
Templates/SubclassOf.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
operator UClass *() |
Implicit conversion to UClass*, does runtime type checking. | Templates/SubclassOf.h | |
UClass * operator*() |
Dereference back into a UClass*, does runtime type checking. | Templates/SubclassOf.h | |
TSubclassOf & operator=
(
U&& From |
Assign from a UClass* (or something implicitly convertible to it). | Templates/SubclassOf.h | |
TSubclassOf & operator=
(
UClass* From |
Assign from a UClass*. | Templates/SubclassOf.h | |
TSubclassOf & operator=
(
const TSubclassOf< OtherT >& Other |
Assign from another TSubclassOf, only if types are compatible | Templates/SubclassOf.h | |
TSubclassOf & operator=
(
TSubclassOf&& |
Templates/SubclassOf.h | ||
TSubclassOf & operator=
(
const TSubclassOf& |
Templates/SubclassOf.h | ||
UClass * operator->() |
Dereference back into a UClass*, does runtime type checking. | Templates/SubclassOf.h |