So one of the programmers on my project is running into a strange problem. We have a pawn class written in c++. Our primary pawn is a blueprint that inherits from this c++ class. This works fine, and all logic to do with spawning the pawn as well as adding instanced static meshes is also working fine.
However he’s tried to create new pawns that inherit from our primary pawn blueprint. Even these work fine - can play as them and use them just like the primary pawn.
However, as soon as he hooks up code in our game to spawn these 3rd level inherited pawns (so OurC++Pawn::FirstLevelBP::SecondLevelBP), even when it’s only called on very specific events (even tried binding to input etc) the engine starts consistently crashing on launch and we get an error as in the title (need to add here that while the engine crashes on launch, but until it’s closed all logic functions correctly without error). I might add that we’re making a multiplayer game and the goal is to allow the player to ‘upgrade’ to these extended pawns on certain events, in-case that is relevant.
Assertion failed: !Obj->HasAnyFlags(RF_NeedLoad|RF_NeedPostLoad|RF_ClassDefaultObject) [File:D:\Build++UE4+Release-4.12+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 2204]
Attempting to replace an object that hasn’t been fully loaded: PhysicsSerializer /Game/Parallax/Blueprints/BlockerPrototype.Default__BlockerPrototype_C:ScrapInstanceableMesh1.PhysicsSerializer (Outer=InstancedStaticMeshComponent /Game/Parallax/Blueprints/BlockerPrototype.Default__BlockerPrototype_C:ScrapInstanceableMesh1, Flags=0x002c3029)
But yeah he’s pretty stumped (we all are). I’m wondering if I’ve set up the instanced static mesh incorrectly in the first place or something? Could there be a best practice I’m missing with this? But yeah I have absolutely no idea what’s going on.