[BUG][4.8.0]"Cast to" warning message: xxx does not inherit from

I build class BP with inherit architecture.

architecture is:

(create new Blank Project)

  • AAA_BP inherit from Actor.h
  • BBB_BP inherit from AAA_BP
  • CCC1_BP inherit from BBB_BP
  • CCC2_BP inherit from BBB_BP

After ClassBP architecture Complete, I Add a AAA_BP array variable named AAA_BP_Arr and spawn a CCC1_BP object, CCC2_BP object set to array in Event Begin Play:

I use “cast to” function in and appear warning message like pic(get[0] is CCC1_BP object spawn in levelBP ):

Actually, BBB_BP is inherit from AAA_BP

(This warning massage is not appear in 4.7.6. when run project in 4.7.6, it will tell you BP has error but no error in compile result, BP still dirty after compiled. Owing to “cast to” function)

Is warning message correct?

There’s not enough information here to actually tell if this is a bug. Check your ‘Class Settings’ Parent Class in BBB_BP to make sure it is actually inheriting AAA_BP.

hi saucy:

parent class is AAA_BP.

Hi rotis,

incorrect cast node warning is a known issue (UE-14123). Thanks for report, though! I’ll post here if I see any update on report.

Thx a lot :smiley:

Good to hear, I thought I was going crazy :slight_smile:
Most of my project is casting after a trigger volume and giving me “No value will be returned by reference. Parameter ‘SweepResult’. Node OnComponentBeginOverlap(Trigger Volume)”

Thanks for update, I’m seeing this as well.

I’ll point out bug happens in Unreal Engine 4.17.1 too. I even used a print statement to confirm cast was succeeding.