UWorld의 StreamingLevels에서 조건에 맞는 레벨을 검색하는 유틸리티입니다.
더 자세히 ...
#include <LevelStreamingLocator.h>
|
| static ULevelStreaming * | FindByName (const UWorld *World, FName LevelName) |
| | StreamingLevels에서 에셋 이름이 일치하는 레벨을 반환합니다.
|
| |
| static ULevelStreaming * | FindVisible (const UWorld *World) |
| | 현재 Visible 상태인 StreamingLevel을 반환합니다.
|
| |
UWorld의 StreamingLevels에서 조건에 맞는 레벨을 검색하는 유틸리티입니다.
◆ FindByName()
| ULevelStreaming * FLevelStreamingLocator::FindByName |
( |
const UWorld * |
World, |
|
|
FName |
LevelName |
|
) |
| |
|
static |
StreamingLevels에서 에셋 이름이 일치하는 레벨을 반환합니다.
- 매개변수
-
| World | 검색 대상 World. |
| LevelName | 찾을 레벨의 에셋 이름. |
- 반환값
- 일치하는 ULevelStreaming 포인터. 없으면 nullptr.
10{
11 if (World == nullptr)
12 {
13 return nullptr;
14 }
15
16 const FString LevelStr = LevelName.ToString();
17
18 auto Found = Algo::FindByPredicate(World->GetStreamingLevels(), [&LevelStr](const ULevelStreaming* Level)
19 {
20 if (Level == nullptr)
21 {
22 return false;
23 }
24
25 FString WorldName = Level->GetWorldAsset().GetAssetName();
26
27 return WorldName.IsEmpty() == false && WorldName == LevelStr;
28 });
29
30 return (Found && *Found) ? *Found : nullptr;
31}
◆ FindVisible()
| ULevelStreaming * FLevelStreamingLocator::FindVisible |
( |
const UWorld * |
World | ) |
|
|
static |
현재 Visible 상태인 StreamingLevel을 반환합니다.
- 매개변수
-
- 반환값
- Visible 상태인 ULevelStreaming 포인터. 없으면 nullptr.
35{
36 if (World == nullptr)
37 {
38 return nullptr;
39 }
40
41 auto Found = Algo::FindByPredicate(World->GetStreamingLevels(), [](const ULevelStreaming* Level)
42 {
43 return Level && Level->IsLevelVisible();
44 });
45
46 return (Found && *Found) ? *Found : nullptr;
47}
이 구조체에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: