RealDocs

UKismetMathLibrary::EqualEqual_ObjectObject

function Engine Blueprint Since 4.0
#include "Kismet/KismetMathLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintPure

Description

Returns true if A and B point to the exact same UObject instance (pointer equality). This is the Blueprint == operator for object references.

Caveats & Gotchas

  • This is identity comparison (same pointer), not value or content equality — two different objects of the same class with identical properties will return false.
  • Comparing against null is valid and commonly used to check whether an object reference is unset; both nullptr inputs return true.

Signature

static UE_INL_API bool EqualEqual_ObjectObject(class UObject* A, class UObject* B)

Parameters

Name Type Description Default
A class UObject* First object reference to compare.
B class UObject* Second object reference to compare.

Return Type

bool

Example

Check if the player is the instigator C++
if (UKismetMathLibrary::EqualEqual_ObjectObject(DamageInstigator, PlayerController))
{
    // Friendly fire
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.