rantrod
(rantrod)
1
I’m unfamiliar with the format you’re using, but this worked for me:
FName LevelName = "/Game/Maps/TestLevel";
UGameplayStatics::OpenLevel(GWorld, LevelName, false);
Otherwise, if “ElvenRuins.ElvenRuins.umap” exists, I’m not sure what’s going on. Are you sure the error comes from the line you listed?
ErayT
(ErayT)
2
Can someone explain me how to load a map via its path in the content?
I have made some search and found this but it fails:
UGameplayStatics::OpenLevel(GetWorld(), "World'/Game/Map/ElvenRuins/ElvenRuins.ElvenRuins'", 0, "");
It gives me this error at runtime:
I do not get what is going on :S
ErayT
(ErayT)
3
I have changed my code as you suggested:
UGameplayStatics::OpenLevel(GetWorld(), "/Game/Map/ElvenRuins/ElvenRuins", false);
But still getting the same error.The url in the code is true. I dont understand why it mentions another map url in my content :S
ErayT
(ErayT)
4
Ok wait it worked! I think it was a hot reload bug. The solution you gave me is correct. Please post your format as answer. I will mark as solution.