언리얼4 HTML5 Build 시도...
Unreal4로 3~4개월 만든 시뮬레이션(Windows PC용)을
Web에서 돌리고 싶다는 Needs가 있어서(왜 있는지 모르겠지만)
시도는 해보았다.
여러가지 문제가 발생 하였는데
정리를 하자면
1. 윈도우용 lib, exe, #include <Windows.h> 등 사용 불가 Error
2. #pragma once 가 cpp에 있으면 Error(h헤더 파일은 당연히 OK)
3. TEXT("한글") Error
4. Runtime으로 메시를 지원해주는 ProceduralMeshComponent 사용불가
5. Plugin으로 쓰고 있던 RamaSaveComponent 사용불가
6. struct 내부에 있는 생성자나 함수 앞에 struct명:: 이 있으면 Error(예로 들면 struct A{ A::A(){} } 이건 Error, struct A{ A(){} } 이건 OK)
7. strtok_s 사용 불가
위의 문제는 어떻게 해서 cpp문제는 다 잡았다.
프로젝트 셋팅에서 타겟 디바이스를 모바일용으로 바꾸고 퀄리티도 낮추었다.
하지만 결국은 LogPlayLevel: BUILD FAILED
PackagingResults:Error: 오류 실행 실패! Unknown Error
눈에 띄는 출력 로그는 아래와 같다.
LogPlayLevel: UnrealBuildTool: INFO:root:Closure compiler (C:\Program Files\Epic Games\UE_4.15\Engine\Extras\ThirdPartyNotUE\emsdk\emscripten\incoming\third_party\closure-compiler\compiler.jar) does not exist, check the paths in C:\Program Files\Epic Games\UE_4.15\Engine\Intermediate\Build\HTML5\.emscripten
LogPlayLevel: UnrealBuildTool: INFO:root:closure compiler will not be available
LogPlayLevel: UnrealBuildTool: error: Linking globals named '_Z14UELinkerFixupsv': symbol multiply defined!
LogPlayLevel: UnrealBuildTool: Traceback (most recent call last):
LogPlayLevel: UnrealBuildTool: File "C:\Program Files\Epic Games\UE_4.15\Engine\Extras\ThirdPartyNotUE\emsdk\emscripten\incoming\emcc", line 13, in <module>
LogPlayLevel: UnrealBuildTool: emcc.run()
LogPlayLevel: UnrealBuildTool: File "C:\Program Files\Epic Games\UE_4.15\Engine\Extras\ThirdPartyNotUE\emsdk\emscripten\incoming\emcc.py", line 1531, in run
LogPlayLevel: UnrealBuildTool: final = shared.Building.llvm_opt(final, link_opts, DEFAULT_FINAL)
LogPlayLevel: UnrealBuildTool: File "C:\Program Files\Epic Games\UE_4.15\Engine\Extras\ThirdPartyNotUE\emsdk\emscripten\incoming\tools\shared.py", line 1633, in llvm_opt
LogPlayLevel: UnrealBuildTool: assert os.path.exists(target), 'Failed to run llvm optimizations: ' + output
LogPlayLevel: UnrealBuildTool: AssertionError: Failed to run llvm optimizations:
LogPlayLevel: UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: C:\Users\apex\Desktop\gcsvc2_WebGL_\Binaries\HTML5\gcsvc.js
LogPlayLevel: UnrealBuildTool: Total build time: 353.94 seconds (Local executor: 0.00 seconds)
구글링 해보니 환경변수 얘기도 있고 추측글들이 난무하는데
다른 글을 찾아보니 언리얼에서 버그 fix된 것을 발견했다.
https://issues.unrealengine.com/issue/UE-36717
4.16에 고칠 예정이라니...(현재 최신 버전 4.15.1)
찾아보니 더 전에도 같은 버그 report가 있었는데
재현이 안된다고 안 넘어갔었나보다.
==================================
//결론
어짜피 언리얼이나 유니티나 Web용은 아직 최적화가 안되고 신경도 많이 쓰고 있지 않아서
안 될 줄 알고 있었다.
==================================
'공부 > Unreal4' 카테고리의 다른 글
UE4.exe 지정된 파일을 찾을 수 없습니다. (0) | 2017.05.11 |
---|---|
'UnrealBuildTool.RulesCompiler.GetModuleFilename(string)'은(는) 사용되지 않습니다 (0) | 2017.05.10 |
Character(Pawn) Move Control(Not Possess) - AddMovementInput 함수에 대해 (0) | 2017.04.20 |
실행(플레이) 창 크기, 창 시작점 구하기 - ffmpeg 로 원하는 영역만큼만 녹화해보자 (0) | 2017.04.19 |
키맵핑(바인딩) 삭제 - PlayerInput 비우기, InputComponent 비우기 (0) | 2017.04.19 |