Hi Everyone.
I’m having some issues when opening a new level into my game, this issue is only caused after I execute a Open Level, and it’s caused by the Following Blueprint script that is run when I want to start a new level in my game.
The thing is that the last node is an C++ node that runs some custom code and it’s supposed to populate the world, but wen I get the Current World in that node and start spawning the actors, they are actually spawned inside the first world the basically they are getting put inside the MaiMenu world.
Here is the code that runs the New Game node:
GEngine->AddOnScreenDebugMessage(-1, 100, FColor::Red, TEXT("New game selected"));
UWorld* const World = GetWorld();
GEngine->AddOnScreenDebugMessage(5, 100, FColor::Red, World->GetMapName());
CurrentPlayState = NewPlayState;
if (World)
{
UKingdom::PlaceResourcesInWorld(World);
}
And the screen that contains the name of the loaded level:
I want to know what needs to be done to actually get the new world, the one that would contain the main player, lets say “World2”.
thank you.