UKismetMathLibrary::NotEqual_ClassClass
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns true if A and B are different UClass instances. Exposes the != operator on class references to Blueprint.
Caveats & Gotchas
- • Tests exact class pointer inequality, not inheritance — a subclass and its parent are always considered not equal by this function.
- • Passing two null pointers returns false (they are equal), while one null and one valid pointer returns true.
Signature
static UE_INL_API bool NotEqual_ClassClass(class UClass* A, class UClass* B) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | class UClass* | First class reference to compare. | — |
| B | class UClass* | Second class reference to compare. | — |
Return Type
bool Example
Filter out a specific class during iteration C++
for (AActor* Actor : FoundActors)
{
if (UKismetMathLibrary::NotEqual_ClassClass(Actor->GetClass(), ASkipMe::StaticClass()))
{
ProcessActor(Actor);
}
} Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?