5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

UE4のビルドしたパッケージに任意のファイルを配置する

Last updated at Posted at 2020-06-29

例えば以下のようにプロジェクト内のtest.txtをshippingビルドでのみパッケージ内に配置したい場合

  • コピー元:プロジェクト直下にあるtest.txt
  • 配置先(Win64の場合):ビルドしたパッケージのWindowsNoEditor/[プロジェクト名]/Binaries/Win64

Build.csに以下のように記述する。

if (Target.Configuration == UnrealTargetConfiguration.Shipping)
{
    RuntimeDependencies.Add("$(BinaryOutputDir)/test.txt", Path.Combine(ModuleDirectory, "..", "..", "test.txt"));
}

参照サイト

その他

以下のサイトのようにuprojectでのPostBuildStepsでcopyを使う方法も検討してみたがビルド先のディレクトリがとれない感じなのでやめた。

Pre/Post build step in UBT - UE4 AnswerHub

5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?