UE4 打包 Config文件配置:
1.黑名单:防止打包Config文件到*.pak中
(1)Default.ini 追加要排除的文件:
[Staging]
+BlacklistConfigFiles=工程名/Config/DefaultEngine.ini
+BlacklistConfigFiles=工程名/Config/DefaultGame.ini
+BlacklistConfigFiles=工程名/Config/DefaultInput.ini
(2)*.Build.cs 添加运行时依赖:(打包时文件自动拷贝到指定目录)
(2.1)命名空间
using System;
using System.IO;
(2.2)运行时依赖项:
RuntimeDependencies.Add(Path.Combine(ModuleDirectory, "../../Config", "DefaultEngine.ini"));
RuntimeDependencies.Add(Path.Combine(ModuleDirectory, "../../Config", "DefaultGame.ini"));
RuntimeDependencies.Add(Path.Combine(ModuleDirectory, "../../Config", "DefaultInput.ini"));