본문으로 건너뛰기
Unreal Engine 모듈 · 플러그인 개발LESSON 10

Runtime·Editor·Developer 모듈을 언제 분리할까

난이도심화
예상 시간80분
선수지식9강의 Runtime Module 추가

10강. Runtime·Editor·Developer 모듈을 언제 분리할까

1. 이번 강의에서 해결할 문제​

Runtime Component가 UnrealEd, PropertyEditor와 Editor Widget을 Include해 Editor에서는 컴파일되지만 Development Game 또는 Shipping 패키징에서 실패합니다. #if WITH_EDITOR를 파일 전체에 둘러도 Build.cs가 Editor Module을 Runtime 의존성으로 링크하면 경계가 해결되지 않습니다.

2. 학습 목표​

3. 핵심 개념​

Runtime Module은 Editor와 패키지 게임에서 사용할 수 있습니다. Editor Module은 Unreal Editor Target에서만 로드되어 메뉴, Slate, UnrealEd와 제작 도구를 담당합니다. Developer Module은 개발 구성에서 필요한 진단·개발 지원에 사용하지만 Shipping에 포함되지 않는 특성을 고려해야 합니다. 정확한 Host Type은 현재 UE 버전의 Module Descriptor를 확인합니다.

공유해야 하는 것은 Runtime 데이터·인터페이스이고 Editor Module은 이를 소비합니다.

ReusableInteraction(Runtime) ◀── DataGuardEditor(Editor)
▲
└────────────── GameProject(Runtime)

금지: ReusableInteraction(Runtime) ─▶ DataGuardEditor(Editor)

4. 단계별 실습​

DataGuard.uplugin 일부
"Modules": [
{
"Name": "DataGuardEditor",
"Type": "Editor",
"LoadingPhase": "PostEngineInit"
}
]

잘못된 Runtime Build.cs:

PrivateDependencyModuleNames.AddRange(new[]
{
"Core", "Engine", "UnrealEd", "PropertyEditor"
});

개선 후에는 Runtime Build.cs에서 Editor 모듈을 모두 제거하고 DataGuardEditor Build.cs에만 둡니다. Runtime 클래스가 Editor에서만 제공할 검증 메타데이터가 있다면 #if WITH_EDITORONLY_DATA로 데이터 필드를 제한할 수 있지만, Editor UI 클래스 자체는 Editor Module로 이동합니다.

검증 행렬:

TargetReusableInteractionDataGuardEditor
Development Editor포함포함
Development Game포함제외
Shipping Game포함제외

5. 코드가 동작하는 이유​

Descriptor Type과 Target이 Module의 빌드·로드 가능 여부를 결정합니다. Editor 모듈을 Runtime 그래프 밖에 두면 패키징 시 UBT가 UnrealEd·Slate 도구 코드의 Binary를 요구하지 않습니다. WITH_EDITOR는 같은 Module 안 일부 구현의 컴파일 조건일 뿐 의존성 방향을 자동으로 바꾸지 않습니다.

6. 자주 하는 실수와 해결법​

7. 직접 실습​

8. 이해 점검 질문 3개​

9. 핵심 요약​

MINI QUIZ

Runtime·Editor·Developer 모듈을 언제 분리할까 미니 퀴즈

선택 즉시 정답과 해설을 확인할 수 있습니다. 결과는 이 브라우저에만 저장됩니다.

0 / 2
  1. 문제 1“Runtime·Editor·Developer 모듈을 언제 분리할까” 코드 리뷰에서 유지해야 할 설계 원칙은 무엇인가요?
  2. 문제 2“Runtime·Editor·Developer 모듈을 언제 분리할까”의 작업 기준으로 ‘Editor에서 빌드되니 Runtime이라고 판단’을 진단하거나 바로잡은 선택은 무엇인가요?
LESSON STATUS

학습을 마쳤나요?

직접 실습과 점검 질문까지 확인한 뒤 완료로 표시하세요.

10강. Runtime·Editor·Developer 모듈을 언제 분리할까 미완료 상태