Skip to content

Unity Download & Install

This Composite Action downloads, then installs Unity. Due to its heavy nature, it features heavy caching and will only download Unity from scratch as a last resort.

This action is due to be deprecated in the future as we move away from Unity.

Download and cache Unity Runtime

- uses: Yellow-Dog-Man/composite-actions-templates/.github/actions/unity-download@main
  with:
    r2-storage-bucket: (1)
    r2-api-id: (2)
    r2-auth-token-id: (3)
    r2-auth-token: (4)
    r2-region: (5)
  1. Storage bucket to use to store the artifacts

  2. Account ID for R2

  3. ID of the authentication token for R2

  4. Authentication token for R2

  5. Region for the R2 account

Downloads the Unity runtime with heavy caching.

Inputs: ยค

Name Description Default
version

The version of Unity to download

2019.4.19f1
build-target

Build target for Unity

StandaloneWindows64
modules

Modules to install, use comma separated list

windows-server universal-windows-platform
r2-storage-bucket

Storage bucket to use to store the artifacts

r2-api-id

Account ID for R2

r2-auth-token-id

ID of the authentication token for R2

r2-auth-token

Authentication token for R2

r2-region

Region for the R2 account

Source of Yellow-Dog-Man/composite-actions-templates/.github/actions/unity-download@main
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: 'Download and cache Unity Runtime'
description: 'Downloads the Unity runtime with heavy caching.'

inputs:
  version:
    description: 'The version of Unity to download'
    required: false
    default: '2019.4.19f1'
  build-target:
    description: 'Build target for Unity'
    required: false
    default: 'StandaloneWindows64'
  modules:
    description: 'Modules to install, use comma separated list'
    required: false
    default: |
      windows-server
      universal-windows-platform
  r2-storage-bucket:
    description: 'Storage bucket to use to store the artifacts'
    required: true
  r2-api-id:
    description: 'Account ID for R2'
    required: true
  r2-auth-token-id:
    description: 'ID of the authentication token for R2'
    required: true
  r2-auth-token:
    description: 'Authentication token for R2'
    required: true
  r2-region:
    description: 'Region for the R2 account'
    required: true

runs:
  using: composite
  steps:
    - name: 'setup Unity'
      uses: buildalon/unity-setup@v2
      with:
        unity-version: ${{ inputs.version }}
        build-targets: ${{ inputs.build-target }}
        modules: ${{ inputs.modules }}
        cache-installation: true