打包如何打包额外文件,比如Sqlite数据库的db文件

本文档详细介绍了如何在Unreal Engine 4 (UE4) 中设置自定义文件的打包选项,包括如何指定需要排除或包含的文件夹,以及如何确保自定义文件在不同平台(如Android、iOS和PC)上的正确路径。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

转载于:https://www.cnblogs.com/blueroses/p/5794437.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值