Spawning BP Class from C++ error : SpawnActor failed because no class was specified

I went to “World Settings” and put GameMode override to my BluePrint versions and after that everything works!
Beats me why it didnt work through ProjectSettings