개발일지공부아이디어
    • 4월
    • 3월
    • 2월
    • 1월
  • 22

    26. 4. 22.

  • 21

    26. 4. 21.

  • 20

    26. 4. 20.

  • 17

    26. 4. 17.

  • 16

    26. 4. 16.

  • 15

    26. 4. 15.

  • 14

    26. 4. 14.

  • 10

    26. 4. 10.

  • 09

    26. 4. 9.

  • 08

    26. 4. 8.

로딩 중...

2026. 4. 21.

전처리기 지시문

#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
왼쪽 화살표오른쪽 화살표