GameMode ans Sprite component from AInfo

I have blueprint that derives from C++ class that derives from AInfo type. AInfo has Sprite component.

Then, while loading dedicated server the following things happen:

FixupRootNodeParentReferences() method from SimpleConstructionScript.cpp reports log:
“LogBlueprint:Warning: USimpleConstructionScript::FixupRootNodeParentReferences() - Couldn’t find native parent component ‘Sprite’ for ‘DefaultSceneRoot’ in BlueprintGeneratedClass ‘#####’ (it may have been removed)”

Blueprint has still information about root sprite component. RootNodes collection has 1 entry with ParentComponentOrVariableName set to “Sprite”. Then CDO is being queried for component with this name. Of course Sprite component does not exist in this configuration.

Question:

How do you handle this problem in GameMode, GameState ??

They also derives from AInfo but their SpriteComponent doesn’t exist even in blueprint when application works as an editor.

Ok, I’ve just found an answer. I had to:

  1. Modify ctor with: PCIP.DoNotCreateDefaultSubobject(TEXT(“Sprite”))
  2. Open all blueprints that derives from our class, recompile and save.

After that, log is clear.