[UE4]工程打包時(shí)添加自定義文件
Project Settings -》 packaging -》 Packaging選項(xiàng)中,有多個(gè)設(shè)置項(xiàng)來(lái)設(shè)置打包時(shí)要排除或者包含的文件夾,比如:設(shè)置哪些目錄不參與cook,以及哪些目錄在打包時(shí)需要拷貝進(jìn)來(lái)的目錄(比如與UE4的文件IO API無(wú)關(guān)的配置文件等等)
注意:這些設(shè)置的目錄必須在Content目錄下
對(duì)于這些自定義文件(非UE4支持的文件格式,比如text文本),安裝后的相對(duì)路徑也不同:
Adding custom files to the Android content.
https://answers.unrealengine.com/questions/120796/adding-custom-files-to-the-android-content.html
On UE 4.7.3 I found a better solution.
On Android I'm using a PathToAndroidPaths function fromEngine\Source\Runtime\Core\Private\Android\AndroidFile.cpp
On IOS I'm using a ConvertToIOSPath function from Engine\Source\Runtime\Core\Private\IOS\IOSPlatformFile.h
On PC I'm using a FPaths::ConvertRelativePathToFull function fromEngine\Source\Runtime\Core\Public\Misc\Paths.h
Most of those function are private, so I made a new, public function that use them for converting relative path to the absolute one.
The ConvertRelativePathToFull from FPaths works correctly only for PC, it doesn't return correct absolute paths for mobile devices.
其他參考:
Additional Asset Directories not Copied to Packaged Build
https://answers.unrealengine.com/questions/241947/additional-asset-directories-not-copied-to-package.html
-
分享到:
您需要登錄后才可以發(fā)帖 登錄 | 立即注冊(cè)
- 用戶(hù)名:
- 密 碼:
- 驗(yàn)證碼: 看不清? 點(diǎn)擊更換
- 忘記密碼?
全部評(píng)論:0條