envenger
(envenger)
1
I am trying to use
(ProjectileClass->IsA(ABaseProjectile::StaticClass()))
But its showing me error and tells me to use
(ProjectileClass->IsChildOf(ATripleProjectile::StaticClass()))
Instead.
Is there anyway to do this direct comparison to check instead of using IsChildOf ?
Rama
(Rama)
2
You’re using IsA to checking the class itself!
For Classes, use Childof
for Actors, use IsA
#Solution
if(YourActor->IsA(ABaseProjectile::StaticClass()))
Rama
5 Likes
envenger
(envenger)
3
The problem is ->IsA
is giving me error and intellisense says me to replace it with ChildOf
Rama
(Rama)
4
but you are writing
ProjectileClass->IsA
you should not be using the class,
you should be using an actual actor
AMyProjectileClass* SomeProjectileInstance = //spawned somewhere;
SomeProjectileInstance->IsA
ChildOf is for direct class comparison
IsA is for instances of a class
Rama