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

Method FindLandscapeActor

Source/URLab/Private/Utils/MeshUtils.cpp:29–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27#include "Utils/URLabLogging.h"
28
29ALandscape* MeshUtils::FindLandscapeActor(UWorld* World)
30{
31 if (!World)
32 {
33 UE_LOG(LogURLabGenerator, Warning, TEXT("World is null!"));
34 return nullptr;
35 }
36
37 for (TActorIterator<ALandscape> It(World); It; ++It)
38 {
39 ALandscape* Landscape = *It;
40 if (Landscape)
41 {
42 UE_LOG(LogURLabGenerator, Log, TEXT("Found a landscape actor: %s"), *Landscape->GetName());
43 return Landscape;
44 }
45 }
46
47 return nullptr;
48}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected