Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Delegates > API/Runtime/Core/Delegates/TObjectPtr
References
| Module | Core |
| Header | /Engine/Source/Runtime/CoreUObject/Public/UObject/ObjectPtr.h |
| Include | #include "UObject/ObjectPtr.h" |
T &42; Get&40;&41; const
Remarks
: OBJPTR: There is a risk that the FObjectPtr is storing a reference to the wrong type. This could happen if data was serialized at a time when a pointer field was declared to be of type A, but then the declaration changed and the pointer field is now of type B. Upon deserialization of pre-existing data, we'll be holding a reference to the wrong type of object which we'll just send back static_casted as the wrong type. Doing a check or checkSlow here could catch this, but it would be better if the check could happen elsewhere that isn't called as frequently.