I am working on a multiplayer game, and recently decided to make a parent animation blueprint to handle the shared functions between the characters, with child classes to specify animations per character. This setup works great, and would surely save me a lot of time. The issue is that once I switch a character blueprint to use one of the child animation blueprints, I can no longer compile my character blueprints without crashing the editor.
My class hierarchy works like this:
For character blueprints:
MyGameCharacter → PlayerCharacter → SamuraiCharacter
For animation blueprints:
MyPlayer → Samurai
Using the MyPlayer parent animation blueprint causes no issues. All my blueprints can compile and the game simulates without error. However, switching SamuraiCharacter to use the Samurai animation blueprint instantly causes the MyGameCharacter and PlayerCharacter classes to crash the editor if they are compiled for any reason, with or without changes. The SamuraiCharacter blueprint can still be modified without issues, but all other character classes will crash the editor.
The Samurai animation blueprint is completely empty (besides running parent update animation) and contains no overrides for testing purposes. Using this child blueprint anywhere causes crashes.
I had gotten to this point earlier in the week and experienced the exact same problem. I reverted my project to before I started messing with animation blueprints, figuring that there was probably a reference error somewhere I couldn’t trace. Starting from the beginning, I was able to produce an identical scenario, and have now isolated the problem to be something with animation child blueprints.
The error message is below:
Assertion failed: ((UObject*)ContainerPtr)->IsA((UClass*)GetOuter()) [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.9\Engine\Source\Runtime\CoreUObject\Public\UObject\UnrealType.h] [Line: 308]
‘AnimBP_SequoiaSamurai_C_4’ is of class ‘AnimBP_SequoiaSamurai_C’ however property ‘StructProperty_203’ belongs to class ‘TRASHCLASS_AnimBP_PlayerCharacter_104’