Navigation
Unreal Engine C++ API Reference > Runtime > Core > UObject > TWeakObjectPtr > IsValid
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/UObject/WeakObjectPtrTemplates.h |
Include | #include "UObject/WeakObjectPtrTemplates.h" |
bool IsValid() const
Remarks
Test if this points to a live UObject. This is an optimized version implying bEvenIfPendingKill=false, bThreadsafeTest=false. This should be done only when needed as excess resolution of the underlying pointer can cause performance issues. Note that IsValid can not be used on another thread as it will incorrectly return false during the mark phase of the GC due to the Unreachable flag being set. (see bThreadsafeTest above) true if Get() would return a valid non-null pointer