Debugging SpawnActor failed because no class was specified

My Blueprint-based game throws a SpawnActor warning that I cannot seem to identify. The log output is below. The game is in four blueprints (Character, GameModeBase, UMG.UserWidget, and aText3DActor [via Plugin]). The Text3DActors are spawned at the beginning of play; however it is clear from the log that the warning is thrown before any of these actors are spawned. In the output below, I added Print String nodes to each BeginPlay event as well as the contruction event/functions for the UMG and character.

The game works as intended in the editor; however a packaged game does not spawn the Text3DActors. Outside of the aforementioned Print String nodes, I have migrated this level to a new project, deleted all scenery except for floors, and have been unable to do anything to affect the warning. I have yet to try recreating the blueprints from scratch into a blank project which is my next step, but Iā€™m hoping to get some suggestions before taking that nuclear approach.

I donā€™t know what else is needed from me in terms of which Blueprints are actually useful.

LogLoad: Game class is ā€˜ChickenGameMode_Cā€™

LogWorld: Bringing World /Game/Maps/UEDPIE_0_Lab-02.Lab-02 up for play (max tick rate 0) at 2020.07.10-16.00.31

LogWorld: Bringing up level for play took: 0.005083

LogOnline: OSS: Creating online subsystem instance for: :Context_24

LogSpawn: Warning: SpawnActor failed because no class was specified

LogBlueprintUserMessages: [ChickenCharacter_C_0] Character Construction

LogBlueprintUserMessages: [ChickenGameMode_C_0] GameMode BeginPlay

LogBlueprintUserMessages: [elementBP_C_0] BP construct

LogBlueprintUserMessages: [elementBP_C_1] BP construct

LogBlueprintUserMessages: [elementBP_C_2] BP construct

LogBlueprintUserMessages: [ChickenUI_C_0] UI Cosntruct

LogBlueprintUserMessages: [Lab-02_C_0] Level

Spawn actor function cannot find that class you specified .which means that class is not included in packaged build. head to project options ->packaging ->check cook all inside content folder

Thanks for your suggestion. It did not change the behavior, unfortunately. I am having problems identifying when this error is triggered because I only have one SpawnActor node in my blueprints, and this error triggers before that node is entered.

LogSpawn: Warning: SpawnActor failed because no class was specified

LogBlueprintUserMessages: [ChickenCharacter_C_0] Character Construction

LogBlueprintUserMessages: [ChickenGameMode_C_0] GameMode BeginPlay

your spawn happens before gamemode beginplay . Which event from which BP calls Spawn?

Thatā€™s the question - The spawn happens before each beginplay of my blueprints, or the construction functions/scripts for UMG widgets and character BP. I donā€™t know how to identify where this spawn is being called, using the editorā€™s search feature has not provided any help.

open game mode and see if any of default bpā€™s are set to something unreasonable . btw you should spawn your pawns and chars inside gamemode by overriding postlogin function.

5 Likes

This was the problem. Since Iā€™m using widgets for making the display, I set HUD to None in Project Settings. Changing it to the base HUD class eliminated the error.

10 Likes

Two years later & your comment here fixed the issue I was having. Extremely vague ā€œLogSpawn: Warning: SpawnActor failed because no class was specifiedā€ with no further details triggering after every Play In Editor run was driving me crazy. Turns out HUD in Maps & Modes had somehow gotten set to None. Not sure how that happened, really.

Wish the editor was more detailed about what was trying to be spawned in that circumstanceā€¦

9 Likes

Thank you! Canā€™t believe they didnā€™t put a nullcheck thereā€¦