Casting to child BP will always fail

Hi all,

I have 2 actor blueprints ‘BP_FlightAttendant’ and ‘BP_FlightAttendant_FullBody’ that are inherited from ‘BP_FloatingVideo’

252802-bp-flightattendant.jpg

252806-bp-flightattendant-fullbody02.jpg

I have a macro that has a BP_FloatingVideo input and then inside this macro, I cast to BP_FlightAttendant or BP_FlightAttendant_FullBody
It functions correctly, but my log is filled with warnings about how the cast will always fail, or that the object is already the expected class.

Is this a bug? I’ve tried removing and readding the input, but that hasn’t sorted it.
Although it works correcly it’s really annoying and I imagine has some sort of performance hit, even if very slight.

Because the object is already the expected class. No need to cast to children ever. If you’re attempting to cast to another instance of the same class you can just get the reference to the instance and use an Interface to call a function on that instance…

I’ve run into similar weirdness in the past once or twice. The solution back then was to completely redo the child classes. In my case it was related to actor components nesting inside.

Consider converting the casts into their pure forms (right click the cast node) and see how it behaves.

No need to cast to children ever.

Yes, interfaces are interfaces, that’s all fine but this normally works out of the box:

252811-capture.png

A redundant cast would produce this, but it would still work fine:

252813-cap2.png

The OP is getting conflicting warnings here.

Same with a pure cast unfortunately.
GrumpyNZ the macro can accept 1 of 3 classes and only some functions are available on the child class, so I have to cast unfortunately

@maffew: While I do not know a direct answer, consider some makeshift debugging - create a child of the Flight Attendant, do not extend it in any way and see if that works.