Navigation
API > API/Runtime > API/Runtime/CoreUObject
Description
Whenever const access to the underlying storage of a TObjectPtr<...> (or a container of them) is needed, use Decay, eg: TMap
void MyFunc(const TMap
MyFunc(MyContainer); // compile error MyFunc(ObjectPtrDecay(MyContainer)); // ok
| Name | ObjectPtrDecay |
| Type | function |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/ObjectPtr.h |
| Include Path | #include "UObject/ObjectPtr.h" |
template<typename T, typename DecayTraits, typename U>
const U & ObjectPtrDecay
(
const T & Value
)