- Unity Hub - You'll want to install whatever version of Unity is necessary to open the src/RGUnityBots project.
- JetBrains Rider - Not required, but highly recommended for development.
The first time you clone this repo you must run script/bootstrap
to prepare your environment.
This installs our precommit hook so that you don't commit code that fails our formatting checks.
You can, and should, re-run this at any time to ensure your environment is up to date.
This repository contains the following folders:
src/gg.regression.unity.bots
- The RegressionGames Unity SDK package.src/RGUnityBots
- A barebones 3D Unity game that is used to build and test the Unity SDK package.samples/
- Additional sample games that use the RegressionGames Unity SDK package.script/
- Scripts used to build and test the SDK. Based off the Scripts To Rule Them All pattern.
To build and test the SDK, open the src/RGUnityBots
Unity project.
Building that project should build and validate all the code in the SDK.
Any tests for the SDK should be added to that project, and can be run from the Unity Test Runner.
Validates that you have the required Unity version installed and installs any other dependencies.
Usage: scripts/bootstrap
Configures the repo for building and testing.
Builds the src/RGUnityBots
package, to check for compilation errors in our package.
Usage: scripts/build [-u|--unity-path <path>] [-b|--build-type <type>]
Builds the Unity project.
Options:
-u, --unity-path <path> Path to the Unity installation to use. Defaults to an autodetected path based on the version of RGUnityBots.
-b, --build-type <type> Type of build to perform. Defaults to the current platform.
-b "Linux" Builds a Linux standalone player.
-b "macOS" Builds a macOS standalone player.
-b "Windows" Builds a Windows standalone player.
Usage: scripts/build [--unity-path <path>] [--skip-edit-mode] [--skip-play-mode] [--category <category>] [--out <output_path>]
Builds the Unity project.
Options:
-u, --unity-path <path> Path to the Unity installation to use. Defaults to an autodetected path based on the version of RGUnityBots.
--skip-edit-mode Skip running the Edit mode tests.
--skip-play-mode Skip running the Play mode tests.
--category <category> Run only tests in the given category. Defaults to all categories.
--out <output_path> Path to write the test results to. Defaults to "artifacts/test-results.xml".
- Create a new Unity Project. Make sure the project's Render Pipeline matches the sample you are importing.
- Import the Regression SDK
- Import the sample into the project
- Make changes to sample
- Run the provided
.sh
script. This will copy the sample you've editedAssets/{SampleName}
to the SDKUnityBots/Samples~/{SampleName}
. - Commit and push changes
Right now, we only support one sample: ThirdPersonDemoURP
, but over time more will be added.
Run the following command and follow the prompts to save your changes.
cd dev-tools
./save_sample_into_sdk.sh
> Enter the full path to the sample in your imported sample project: <COPY THE ABSOLUTE PATH OF YOUR SAMPLE HERE>
Copying /Users/you/SampleDemo/Assets/ThirdPersonDemoURP into /Users/you/RGUnityBots/Samples~