Navigation
API > API/Runtime > API/Runtime/Core
[TWeakPtrVariant](API\Runtime\Core\TWeakPtrVariant)_ and TStrongPtrVariant are particularly useful for "interfaces" in areas where UObjects and non-UObjects exist to hold onto a "smart" pointer to the Interface, rather than needing to keep track of the implementing class to check validity and manually cast [TWeakPtrVariant](API\Runtime\Core\TWeakPtrVariant)_ will be either a TWeakObjectPtr or `TWeakPtr_
| Name | TWeakPtrVariant |
| Type | struct |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/PointerVariants.h |
| Include Path | #include "Templates/PointerVariants.h" |
Syntax
template<typename BaseType>
struct TWeakPtrVariant : public UE::Core::Private::TPtrVariantBase< BaseType, false >
Inheritance Hierarchy
- TPtrVariantBase → TWeakPtrVariant
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| Super | UE::Core::Private::TPtrVariantBase< BaseType, false > | Templates/PointerVariants.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TStrongPtrVariant< BaseType > Pin() |
Templates/PointerVariants.h |