打包如何打包額外文件,比如Sqlite數據庫的db文件


http://aigo.iteye.com/blog/2278224

 

Project Settings -》 packaging -》 Packaging選項中,有多個設置項來設置打包時要排除或者包含的文件夾,比如:設置哪些目錄不參與cook,以及哪些目錄在打包時需要拷貝進來的目錄(比如與UE4的文件IO API無關的配置文件等等)

注意:這些設置的目錄必須在Content目錄下



 

對於這些自定義文件(非UE4支持的文件格式,比如text文本),安裝后的相對路徑也不同:

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


免責聲明!

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



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