代码拉取完成,页面将自动刷新
#! /bin/bash
# get path of current script: https://stackoverflow.com/a/39340259/207661
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pushd "$SCRIPT_DIR" >/dev/null
set -e
set -x
#confirm unreal install directory
UnrealDir=$1
if [[ !(-z "UnrealDir") ]]; then
UnrealDir="$SCRIPT_DIR/UnrealEngine"
fi
read -p "Unreal will be installed in $UnrealDir. To change it invoke script with path argument. Continue? " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
popd >/dev/null
exit 0
fi
#install unreal
if [[ !(-d "$UnrealDir") ]]; then
git clone -b 4.18 https://github.com/EpicGames/UnrealEngine.git "$UnrealDir"
pushd "$UnrealDir" >/dev/null
./Setup.sh
./GenerateProjectFiles.sh
make
popd >/dev/null
fi
#install airsim
./setup.sh
./build.sh
#start Unreal editor with Blocks project
pushd "$UnrealDir" >/dev/null
if [ "$(uname)" == "Darwin" ]; then
Engine/Binaries/Mac/UE4Editor.app/Contents/MacOS/UE4Editor "$SCRIPT_DIR/Unreal/Environments/Blocks/Blocks.uproject" -game -log
else
Engine/Binaries/Linux/UE4Editor "$SCRIPT_DIR/Unreal/Environments/Blocks/Blocks.uproject" -game -log
fi
popd >/dev/null
popd >/dev/null
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。