TWeakObjectPtr::IsValid

Test if this points to a live [UObject](API\Runtime\CoreUObject\UObject\UObject)

Choose your operating system:

Windows

macOS

Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/UObject/WeakObjectPtrTemplates.h

Include

#include "UObject/WeakObjectPtrTemplates.h"

Syntax

bool IsValid
(
    bool bEvenIfPendingKill,
    bool bThreadsafeTest
) const

Remarks

Test if this points to a live UObject

Returns

true if Get() would return a valid non-null pointer

Parameters

Parameter

Description

bEvenIfPendingKill

if this is true, pendingkill objects are considered valid

bThreadsafeTest

if true then function will just give you information whether referenced UObject is gone forever (return false) or if it is still there (return true, no object flags checked).