Skip to content

Instantly share code, notes, and snippets.

@sarah-j-smith
Last active April 18, 2026 11:55
Show Gist options
  • Select an option

  • Save sarah-j-smith/cc4f2294de028c8be86c3255dfa52e17 to your computer and use it in GitHub Desktop.

Select an option

Save sarah-j-smith/cc4f2294de028c8be86c3255dfa52e17 to your computer and use it in GitHub Desktop.

Mac (Apple) Bash Script to Regenerate Unreal Project

Assumes you:

  • run it from the terminal inside your project MyGame folder
  • project folder name is the same as your project name MyGame
  • project MyGame.uproject file is in the folder
  • set the Unreal Engine version number correctly in the script
PROJ=$(find . -name "*.uproject")
if [ -z "$PROJ" ]; then
echo "Run this from inside the folder containing your Unreal project - eg \"MyGame.uproject\"."
exit 1;
fi
# Only major version as per pathname
UNREAL_VERSION=5.6
PROJ_NAME=$(basename $PROJ .uproject)
CUR_DIR=$(pwd)
echo "Regenerating project files for ${PROJ_NAME}..."
sh /Users/Shared/Epic\ Games/UE_${UNREAL_VERSION}/Engine/Build/BatchFiles/Mac/GenerateProjectFiles.sh \
-project=${CUR_DIR}/${PROJ_NAME}.uproject -game -engine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment