打包如何打包额外文件,比如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 fromEngineSourceRuntimeCorePrivateAndroidAndroidFile.cpp

On IOS I'm using a ConvertToIOSPath function from EngineSourceRuntimeCorePrivateIOSIOSPlatformFile.h

On PC I'm using a FPaths::ConvertRelativePathToFull function fromEngineSourceRuntimeCorePublicMiscPaths.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

原文地址:https://www.cnblogs.com/blueroses/p/5794437.html