#!/usr/bin/env bash

# Run in ACTIVATE_LICENSE_PATH directory
echo "Changing to \"$ACTIVATE_LICENSE_PATH\" directory."
pushd "$ACTIVATE_LICENSE_PATH"

/Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/MacOS/Unity \
  -logFile /dev/stdout \
  -batchmode \
  -nographics \
  -quit \
  -returnlicense \
  -projectPath "$ACTIVATE_LICENSE_PATH"

# Return to previous working directory
popd
