전처리기 지시문
#if, #define → 전처리기 지시문
- 컴파일 전(전처리 단계)에 코드를 조건부로 포함/제외하는 명령
#if WITH_EDITOR // 에디터에서만 실행되는 코드#endif#if UE_BUILD_SHIPPING // 최종 배포 빌드에서만 실행#endif#if UE_BUILD_DEBUG // 디버그 빌드에서만 실행#endif#if PLATFORM_WINDOWS // Windows 전용 코드#elif PLATFORM_PS5 // PlayStation 5 전용 코드#elif PLATFORM_ANDROID // Android 전용 코드#endif생각해보니 #include가 전처리 구문이었다
#ifndef ENABLE_DRAW_DEBUG#define ENABLE_DRAW_DEBUG UE_ENABLE_DEBUG_DRAWING#endif...#ifndef UE_ENABLE_DEBUG_DRAWING // we can debug render data in Debug/Development builds, or the Editor in Shipping or Test builds (not a common situation, but it is possible) #define UE_ENABLE_DEBUG_DRAWING (!(UE_BUILD_SHIPPING || UE_BUILD_TEST) || WITH_EDITOR)#endif