Check if a blueprint is a child actor of another

Hi all,

So I have a parent blueprint, which has a child actor.

From the construction script of the child actor, I would like to get a variable, referencing it’s parent. (If it is a child actor).

How would I do this?

There’s a function ‘Class Is Child Of’ if that’s what your looking. but i think creating a variable casted to its parent class will enable you to access the variable of that class that you’re looking for

It’s returning false.

I have a get class of self wired into test class and parent class as the class that has the child actor as a component.

37219-capture1.png

Are you sure that the ‘Self’ is inherited from ‘Default Player Class’?

In any case you can create a new variable of that Parent class if you want to access a certain variable from that parent class

‘Class Is Child Of’’ is what you’re looking for.

1 Like