虛幻4編譯手記


虛幻4的源文件組織碼相對與虛幻3個人感覺清楚了很多,明顯是良心准備過的。編譯非常簡單,基本都是自動化一鍵生成的,去git下兩個依賴文件(有個可選項,我沒下),解壓與源代碼文件融合,運行根目錄下的GenerateProjectFiles.bat文件1分鍾以內就生成了一個sln解決方案文件,打開選擇development Editor,直接build UE4即可,不需要其他的任何設置。編譯時間會持續15到40分鍾。編譯完成后,直接調試就可以打開編輯器。

可選項:GenerateProjectFiles.bat默認會生成所有檢測到SDK的平台的構建項目,使用-CurrentPlatform來僅生成當前平台的構建項目。
重要的一點:每次更新源代碼后都要運行GenerateProjectFiles.bat,否則可能會無法編譯。如果自己改動了模塊(比如增刪源文件),也要重新運行GenerateProjectFiles.bat。官方不推薦手動更改項目文件。也可以使用UnrealVS來重新生成項目當前加載項目的項目文件。
如果只是想使用學習UE4的話,推薦還是使用官方編譯好的編輯器,以防止出現一些無解的問題。

記錄幾個我在windows上構建時遇到的幾個小細節。

1、依賴包的正確融合

2、保持磁盤空間在15G以上

3、生成完成后如果在編譯DefaultDeferredDecalMaterial時候自動退出,注銷系統再啟動即可。(具體原因不是很清楚,可能是因為某些程序被長期占用的緣故。)

但是需要注意的是:

使用Development Editor編譯出來的編輯器在我的電腦上經常出現打包問題,因該是從來沒有打包成功過,而且打包過程相當緩慢。最后打包失敗似乎還是因為編譯DefaultDeferredDecalMaterial失敗。

沒有仔細讀過官方文檔,具體問題原因還不知道,希望知道答案的人賜教。

log如下:

 

Log file open, 03/22/14 11:27:34
LogInit:Display: Running engine without a game
LogInit: Version: 4.0.1-0+UE4
LogInit: Compiled (64-bit): Mar 22 2014 05:19:06
LogInit: Build Configuration: Development
LogInit: Branch Name: UE4
LogInit: Command line:
LogInit: Base directory: D:/UnrealEngine4/Engine/Binaries/Win64/
[2014.03.22-23.27.34:166][  0]LogTaskGraph: Started task graph with 3 named threads and 4 total threads.
[2014.03.22-23.27.34:243][  0]LogOnline:Warning: No default platform service specified for OnlineSubsystem
[2014.03.22-23.27.34:425][  0]LogInit: Presizing for 0 objects not considered by GC, pre-allocating 0 bytes.
[2014.03.22-23.27.34:629][  0]LogInit: Object subsystem initialized
[2014.03.22-23.27.34:710][  0]LogInit: Selected Device Profile: [Windows]
[2014.03.22-23.27.34:721][  0]LogInit: Applying CVar settings loaded from the selected device profile: [Windows]
[2014.03.22-23.27.34:813][  0]LogInit: Computer: WUBUGUI-PC
[2014.03.22-23.27.34:813][  0]LogInit: User: wubugui
[2014.03.22-23.27.34:816][  0]LogInit: CPU Page size=4096, Cores=4
[2014.03.22-23.27.34:816][  0]LogInit: High frequency timer resolution =2.046191 MHz
[2014.03.22-23.27.34:816][  0]LogInit: Memory total: Physical=7.9GB (8GB approx) Pagefile=8184.1GB Virtual=8192.0GB
[2014.03.22-23.27.34:915][  0]LogD3D11RHI: Found D3D11 adapter 0: Intel(R) HD Graphics 4000 (Feature Level 11_0)
[2014.03.22-23.27.34:915][  0]LogD3D11RHI: Adapter has 2094MB of dedicated video memory, 0MB of dedicated system memory, and 3777MB of shared system memory
[2014.03.22-23.27.34:956][  0]LogRHI: Texture pool is 1361 MB (70% of 1945 MB)
[2014.03.22-23.27.34:978][  0]LogD3D11RHI: Async texture creation enabled
[2014.03.22-23.27.36:101][  0]LogContentStreaming: Texture pool size is 0.000000MB
[2014.03.22-23.27.36:327][  0]LogInit: WinSock: version 1.1 (2.2), MaxSocks=32767, MaxUdp=65467
[2014.03.22-23.27.39:854][  0]LogTargetPlatformManager:Display: Building Assets For Windows
[2014.03.22-23.27.40:131][  0]LogTargetPlatformManager:Display: Building Assets For Windows
[2014.03.22-23.27.40:226][  0]LogDerivedDataCache:Display: Max Cache Size: 512 MB

[2014.03.22-23.27.40:226][  0]LogDerivedDataCache:Warning: Could not find memory cache ../../../Engine/DerivedDataCache/Boot.ddc.
[2014.03.22-23.27.40:226][  0]LogDerivedDataCache:Warning: Could not load Boot cache: ../../../Engine/DerivedDataCache/Boot.ddc
[2014.03.22-23.27.40:226][  0]LogDerivedDataCache: FDerivedDataBackendGraph:  Pak pak cache file ../../../Engine/DerivedDataCache/DDC.ddp not found, will not use a pak cache.
[2014.03.22-23.27.40:226][  0]LogDerivedDataCache: Unable to find inner node Pak for hierarchical cache Hierarchy.
[2014.03.22-23.27.40:226][  0]LogDerivedDataCache: FDerivedDataBackendGraph:  EnginePak pak cache file ../../../Engine/DerivedDataCache/DDC.ddp not found, will not use a pak cache.
[2014.03.22-23.27.40:226][  0]LogDerivedDataCache: Unable to find inner node EnginePak for hierarchical cache Hierarchy.
[2014.03.22-23.27.40:238][  0]LogDerivedDataCache: Using Local data cache path ../../../Engine/DerivedDataCache: Writable
[2014.03.22-23.27.45:492][  0]LogDerivedDataCache:Warning: Fail to write to //epicgames.net/root/UE4DDC, derived data cache to this directory will be read only.
[2014.03.22-23.27.45:493][  0]LogDerivedDataCache:Warning: Shared data cache path was not usable, will not use it.
[2014.03.22-23.27.45:493][  0]LogDerivedDataCache: Unable to find inner node Shared for hierarchical cache Hierarchy.
[2014.03.22-23.27.55:507][  0]LogTexture:Display: c(匉4? Bad (BGRA8)
[2014.03.22-23.27.55:536][  0]LogTexture:Display: c(匉4? Bkgnd (AutoDXT)
[2014.03.22-23.27.55:572][  0]LogTexture:Display: c(匉4? BkgndHi (AutoDXT)
[2014.03.22-23.27.55:970][  0]LogMeshUtilities: No automatic mesh reduction module available
[2014.03.22-23.27.55:970][  0]LogMeshUtilities: No automatic mesh merging module available
[2014.03.22-23.27.55:971][  0]LogStaticMesh: c(匉YQ<EditorCube...
[2014.03.22-23.27.56:044][  0]LogStaticMesh: Built static mesh [126.306877ms] /Engine/EditorMeshes/EditorCube.EditorCube
[2014.03.22-23.27.56:243][  0]LogStaticMesh: c(匉YQ<EditorSphere...
[2014.03.22-23.27.56:383][  0]LogStaticMesh: Built static mesh [140.656464ms] /Engine/EditorMeshes/EditorSphere.EditorSphere
[2014.03.22-23.27.56:473][  0]LogStaticMesh: c(匉YQ<EditorPlane...
[2014.03.22-23.27.56:474][  0]LogStaticMesh: Built static mesh [0.686642ms] /Engine/EditorMeshes/EditorPlane.EditorPlane
[2014.03.22-23.27.56:506][  0]LogStaticMesh: c(匉YQ<EditorCylinder...
[2014.03.22-23.27.56:520][  0]LogStaticMesh: Built static mesh [13.810538ms] /Engine/EditorMeshes/EditorCylinder.EditorCylinder
[2014.03.22-23.27.56:612][  0]LogTexture:Display: c(匉4? Texture2D_28 (AutoDXT)
[2014.03.22-23.27.56:733][  0]LogTexture:Display: c(匉4? Default (BGRA8)
[2014.03.22-23.27.57:195][  0]LogTexture:Display: c(匉4? T_Default_Material_Grid_M (AutoDXT)
[2014.03.22-23.27.57:563][  0]LogTexture:Display: c(匉4? T_Default_Material_Grid_N (BC5)
[2014.03.22-23.27.57:678][  0]LogTexture:Display: c(匉4? DefaultDiffuse (AutoDXT)
[2014.03.22-23.27.59:443][  0]LogMaterial: Missing cached shader map for material WorldGridMaterial, compiling.
[2014.03.22-23.28.54:361][  0]LogMaterial: Missing cached shader map for material DefaultDeferredDecalMaterial, compiling.
[2014.03.22-23.28.54:967][  0]LogShaderCompilers:Warning:     warning: Unknown encoding: zh_CN

[2014.03.22-23.28.54:967][  0]LogWindows:Error: appError called: Failed to compile default material /Engine/EngineMaterials/DefaultDeferredDecalMaterial.DefaultDeferredDecalMaterial!
[2014.03.22-23.28.54:967][  0]LogWindows:Error: Windows GetLastError: 蚛煂 (0)
[2014.03.22-23.29.58:660][  0]LogWindows: === Critical error: ===


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM