YiSan 전반에서 사용하는 공용 인터페이스를 선언합니다.
더 자세히 ...
이 파일의 소스 코드 페이지로 가기
YiSan 전반에서 사용하는 공용 인터페이스를 선언합니다.
Macro.h 파일에서 정의되었습니다.
◆ BIND_DYNAMIC_DELEGATE
| #define BIND_DYNAMIC_DELEGATE |
( |
|
DelegateType, |
|
|
|
Obj, |
|
|
|
ClassType, |
|
|
|
FuncName |
|
) |
| |
값:[] (auto* InObj) { \
DelegateType Tmp; \
Tmp.BindUFunction(InObj, GET_FUNCTION_NAME_CHECKED(ClassType, FuncName)); \
return Tmp; \
} (Obj)
Macro.h 파일의 76 번째 라인에서 정의되었습니다.
77 { \
78DelegateType Tmp; \
79Tmp.BindUFunction(InObj, GET_FUNCTION_NAME_CHECKED(ClassType, FuncName)); \
80return Tmp; \
81} (Obj)
◆ DECLARE_SUBSYSTEM_GETTER
| #define DECLARE_SUBSYSTEM_GETTER |
( |
|
ClassName | ) |
|
값:UFUNCTION(BlueprintPure, Category="CoffeeLibrary|Subsystem", meta=(WorldContext="WorldContextObject")) \
static ClassName*
Get(UObject* WorldContext);
Macro.h 파일의 60 번째 라인에서 정의되었습니다.
◆ DEFINE_LOCALPLAYER_FROM_PC_SUBSYSTEM_GETTER_INLINE
| #define DEFINE_LOCALPLAYER_FROM_PC_SUBSYSTEM_GETTER_INLINE |
( |
|
ClassName | ) |
|
값:UFUNCTION(BlueprintPure, Category="CoffeeLibrary|Subsystem", meta=(WorldContext="WorldContextObject")) \
static ClassName* GetFromPlayerController(UObject* WorldContextObject, APlayerController* PC) \
{ \
if (!WorldContextObject || !PC) \
return nullptr; \
if (ULocalPlayer* LP = Cast<ULocalPlayer>(PC->Player)) \
{ \
return LP->GetSubsystem<ClassName>(); \
} \
return nullptr; \
}
Macro.h 파일의 44 번째 라인에서 정의되었습니다.
47{ \
48 if (!WorldContextObject || !PC) \
49 return nullptr; \
50 if (ULocalPlayer* LP = Cast<ULocalPlayer>(PC->Player)) \
51 { \
52 return LP->GetSubsystem<ClassName>(); \
53 } \
54 return nullptr; \
55}
◆ DEFINE_LOCALPLAYER_SUBSYSTEM_GETTER_INLINE
| #define DEFINE_LOCALPLAYER_SUBSYSTEM_GETTER_INLINE |
( |
|
ClassName | ) |
|
값:UFUNCTION(BlueprintPure, Category="CoffeeLibrary|Subsystem", meta=(WorldContext="WorldContextObject")) \
static ClassName*
Get(UObject* WorldContextObject) \
{ \
if (!WorldContextObject) \
return nullptr; \
if (UWorld* World = WorldContextObject->GetWorld()) \
{ \
if (UGameInstance* GameInstance = World->GetGameInstance()) \
{ \
if (ULocalPlayer* LocalPlayer = GameInstance->GetFirstGamePlayer()) \
{ \
return LocalPlayer->GetSubsystem<ClassName>(); \
} \
} \
} \
return nullptr; \
}
Macro.h 파일의 24 번째 라인에서 정의되었습니다.
27{ \
28 if (!WorldContextObject) \
29 return nullptr; \
30 if (UWorld* World = WorldContextObject->GetWorld()) \
31 { \
32 if (UGameInstance* GameInstance = World->GetGameInstance()) \
33 { \
34 if (ULocalPlayer* LocalPlayer = GameInstance->GetFirstGamePlayer()) \
35 { \
36 return LocalPlayer->GetSubsystem<ClassName>(); \
37 } \
38 } \
39 } \
40 return nullptr; \
41}
◆ DEFINE_SUBSYSTEM_GETTER_IMPL
| #define DEFINE_SUBSYSTEM_GETTER_IMPL |
( |
|
ClassName | ) |
|
값:static ClassName*
Get(UObject* WorldContext) \
{ \
if (!WorldContext) \
return nullptr; \
if (auto* World = WorldContext->GetWorld()) \
if (auto* GI = World->GetGameInstance()) \
return GI->GetSubsystem<ClassName>(); \
return nullptr; \
}
Macro.h 파일의 65 번째 라인에서 정의되었습니다.
67{ \
68 if (!WorldContext) \
69 return nullptr; \
70 if (auto* World = WorldContext->GetWorld()) \
71 if (auto* GI = World->GetGameInstance()) \
72 return GI->GetSubsystem<ClassName>(); \
73 return nullptr; \
74}
◆ DEFINE_SUBSYSTEM_GETTER_INLINE
| #define DEFINE_SUBSYSTEM_GETTER_INLINE |
( |
|
ClassName | ) |
|
값:UFUNCTION(BlueprintPure, Category="CoffeeLibrary|Subsystem", meta=(WorldContext="WorldContextObject")) \
static ClassName*
Get(UObject* WorldContext) \
{ \
if (!WorldContext) \
return nullptr; \
if (auto* World = WorldContext->GetWorld()) \
if (auto* GI = World->GetGameInstance()) \
return GI->GetSubsystem<ClassName>(); \
return nullptr; \
}
Macro.h 파일의 11 번째 라인에서 정의되었습니다.
14{ \
15if (!WorldContext) \
16return nullptr; \
17if (auto* World = WorldContext->GetWorld()) \
18if (auto* GI = World->GetGameInstance()) \
19return GI->GetSubsystem<ClassName>(); \
20return nullptr; \
21}
◆ ENUM_TO_NAME
| #define ENUM_TO_NAME |
( |
|
EnumType, |
|
|
|
Value |
|
) |
| (StaticEnum<EnumType>()->GetNameStringByValue(static_cast<int64>(Value))) |
◆ ENUM_TO_TEXT
| #define ENUM_TO_TEXT |
( |
|
EnumType, |
|
|
|
Value |
|
) |
| (StaticEnum<EnumType>()->GetDisplayNameTextByValue(static_cast<int64>(Value))) |