Description

When attempting to cast a parent actor to a child actor, if the parent uses "self" as the target of the cast the blueprint will compile, but when PIE is pressed a compile error will appear.

Steps to Reproduce
  1. Open editor with third person template
  2. Open "ThirdPersonBP" folder, in Content Browser
  3. Right-click on "ThirdPersonCharacter" Blueprint and select "Create Child Blueprint Class"
  4. Double-click "ThirdPersonBP" (not child) to open it.
  5. Add Blueprint logic show in screen shot
  6. Compile and save
  7. PIE with "ThirdPersonBP" still open so you can see debug of it.

RESULT:
Compiling gives no warning or error about cast but when you play you get an error.

EXPECTED:
Compiling gives you error or warning of issue.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

2
Login to Vote

Cannot Reproduce
ComponentUE - Gameplay - Blueprint
Affects Versions4.6.14.13
CreatedJan 8, 2015
ResolvedJul 8, 2016
UpdatedJul 14, 2021