MCPcopy Create free account
hub / github.com/URLab-Sim/UnrealRoboticsLab / LoadLevelSync

Function LoadLevelSync

Source/URLabEditor/Private/MjLevelOps.cpp:267–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267bool LoadLevelSync(const FString& NameOrPath, FString& OutLevelPath, FString& OutError)
268{
269 ULevelEditorSubsystem* Sub = GetLevelSub();
270 if (!Sub)
271 {
272 OutError = TEXT("LevelEditorSubsystem unavailable");
273 return false;
274 }
275
276 OutLevelPath = ResolveLevelPath(NameOrPath);
277 if (!Sub->LoadLevel(OutLevelPath))
278 {
279 OutError = FString::Printf(TEXT("LoadLevel failed for %s"), *OutLevelPath);
280 return false;
281 }
282 return true;
283}
284
285bool SaveCurrentLevelSync(FString& OutLevelPath, FString& OutError)
286{

Callers 2

HandleLoadLevelFunction · 0.85
RunTestMethod · 0.85

Calls 2

GetLevelSubFunction · 0.85
ResolveLevelPathFunction · 0.85

Tested by 1

RunTestMethod · 0.68