Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

Repository files navigation

Unity Action (XRTK)

Important

The action is no longer be maintained and has been moved to buildalon/unity-action

An atomic GitHub Action that runs cli tool for passing commands to the Unity Engine.

Part of the Mixed Reality Toolkit (XRTK) open source project.

This action does not require the use of XRTK in your Unity project.

Related Github Actions

How to use

Inputs

InputDescriptionRequiredDefault
build-targetPlatform build target.false''
argsUnity command line arguments.false'-quit -batchmode -nographics'
log-nameName of the Unity Log.false'Unity'

Outputs

A unity-process-id.txt file containing the ID of the Unity process running during the Unity Action execution is created in the workspace directory. This output is useful if you need to kill the Unity process after the action execution. You can retrieve the process ID by reading the contents of the unity-process-id.txt file.

Example

jobs:
build:
runs-on: ${{ matrix.os }}strategy:
#max-parallel: 2 # Use this if you're activating pro license with matrixmatrix:
include:
- os: ubuntu-latestbuild-target: StandaloneLinux64
- os: windows-latestbuild-target: StandaloneWindows64
- os: macos-latestbuild-target: StandaloneOSXsteps:
- name: checkout selfuses: actions/checkout@v3# Installs the Unity Editor based on your project version text file# sets -> env.UNITY_EDITOR_PATH# sets -> env.UNITY_PROJECT_PATH# https://github.com/XRTK/unity-setup
- uses: xrtk/unity-setup@v7.4with:
build-targets: ${{ matrix.build-target }}# Activates the installation with the provided credentials
- uses: xrtk/activate-unity-license@v5.1with:
# Requiredusername: ${{ secrets.UNITY_USERNAME }}password: ${{ secrets.UNITY_PASSWORD }}# Optionallicense-type: 'Personal'# Chooses license type to use [ Personal, Professional ]serial: ${{ secrets.UNITY_SERIAL }} # Required for pro/plus activations
- uses: xrtk/unity-action@v6.1name: '${{ matrix.build-target }}-Tests'with:
build-target: '${{ matrix.build-target }}'args: '-batchmode -runEditorTests'log-name: '${{ matrix.build-target }}-Tests'
- uses: xrtk/unity-action@v6.1name: '${{ matrix.build-target }}-Build'with:
build-target: '${{ matrix.build-target }}'args: '-quit -batchmode -executeMethod XRTK.Editor.BuildPipeline.UnityPlayerBuildTools.StartCommandLineBuild'log-name: '${{ matrix.build-target }}-Build'

About

A basic Unity action for XRTK GitHub action workflows

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages