PostBuildStep usage

I’m building a game for Android, with a lot of different splashscreens for the various resolutions.
Since I didn’t find any out-of-the-box “copy files in build folder”, I added in myproject.uproject the following:

  "PostBuildSteps": {
    "Win64": [
      "xcopy  \"$(ProjectDir)\\AdditionalContent\\$(TargetPlatform)\" \"$(ProjectDir)\\Build\\$(TargetPlatform)\" /S /Y /I"

NOTE: Apparently, those PostBuildSteps check the HOST environment, not the TARGET environment, that’s why I put Win64 even though I’m building an Android app.

It works, but it’s executed even when I’m building the DevelopmentEditor version (to launch the editor), so it tries to find a MyProject/AdditionalContent/Win64 folder.

Is this an unskippable side effect, or is there some way to “filter” the configuration?


1 Like

I faced a similar problem and worked around it by calling a .bat file an passing some additional arguments to it. $(EngineDir), $(ProjectDir), $(TargetName), $(TargetPlatform)', $(TargetConfiguration)

Then I did the required filtering, only for certain platforms and certain configurations inside of the .bat itself based on the arguments passed along