How to spawn a blueprint actor via C++

Most probably the NewActor reference is null, can you do a “if” branch after spawning the actor, to print a string if the NewActor is indeed null?
If that’s the case, then also add a if to check if the UClass *ClassToSpawn is null also, that could be your problem.

If the UClass is null, then the find object returned nothing, try to right click your blueprint (the one you want to spawn) and “Get Reference” or something like that, that will give you the full path of the blueprint,