leopard8352
2023-12-04 8871a733498c8d717714b83bb096b7738224541a
提交 | 用户 | 时间
8871a7 1 // Copyright Epic Games, Inc. All Rights Reserved.
L 2
3 #pragma once
4
5 #include "CoreMinimal.h"
6 #include "Modules/ModuleManager.h"
7
8 DECLARE_LOG_CATEGORY_EXTERN(LogTaptap, Display, All);
9
10 #define TAPLOG(Verbosity, Format, ...) \
11 { \
12 UE_LOG(LogTaptap, Verbosity, Format, ##__VA_ARGS__); \
13 GEngine->AddOnScreenDebugMessage( \
14 -1,7,FColor::Green,FString::Printf(Format,##__VA_ARGS__)); \
15 }
16
17 #define TAPLOG_D(Format, ...) \
18 { \
19 UE_LOG(LogTaptap, Display, Format, ##__VA_ARGS__); \
20 GEngine->AddOnScreenDebugMessage( \
21 -1,7,FColor::Green,FString::Printf(Format,##__VA_ARGS__)); \
22 }
23
24 #define TAPLOG_W(Format, ...) \
25 { \
26 UE_LOG(LogTaptap, Warning, Format, ##__VA_ARGS__); \
27 GEngine->AddOnScreenDebugMessage( \
28 -1,7,FColor::Yellow,FString::Printf(Format,##__VA_ARGS__)); \
29 }
30
31 #define TAPLOG_E(Format, ...) \
32 { \
33 UE_LOG(LogTaptap, Error, Format, ##__VA_ARGS__); \
34 GEngine->AddOnScreenDebugMessage( \
35 -1,7,FColor::Red,FString::Printf(Format,##__VA_ARGS__)); \
36 }
37
38 class FTaptapModule : public IModuleInterface
39 {
40 public:
41     
42     /** IModuleInterface implementation */
43     virtual void StartupModule() override;
44     virtual void ShutdownModule() override;
45 };