Unity - Builder
유니티 빌드를 도와주는 github extension이다.
https://github.com/marketplace/actions/unity-builder
Unity - Builder - GitHub Marketplace
Build Unity projects for different platforms
github.com
name: Build project
on: [push, pull_request]
jobs:
buildForAllSupportedPlatforms:
name: Build for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
- StandaloneWindows # Build a Windows standalone.
- StandaloneWindows64 # Build a Windows 64-bit standalone.
- StandaloneLinux64 # Build a Linux 64-bit standalone.
- iOS # Build an iOS player.
- Android # Build an Android .apk standalone app.
- WebGL # WebGL.
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v3
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- if: matrix.targetPlatform == 'Android'
uses: jlumbroso/free-disk-space@v1.3.1
- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
- uses: actions/upload-artifact@v3
with:
name: Build-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
push나 pull request가 일어나면 빌드하는 스크립트이다.
타겟 플랫폼을 설정할 수 있고 "steps"에 작성된 순서대로 빌드가 진행된다.
Use lastes version을 누르면 위와 같은 화면을 볼 수 있다.
버전을 선택하면 설치하는 방법을 보여준다.
시제로 이를 적용하기 위해서는 스크립트를 프로젝트 내에 저장하여 실행하도록 해야 한다.
프로젝트에 ".github/workflows"라는 폴더를 생성한 뒤 "unity-builder.yml"파일을 생성하여 위에 있는 스크립트를 복사한다.
그리고 변경내용을 commit한 뒤, push한다.
이후, 유니티 라이선스에 대한 설정이 필요하다.
setting을 눌러 다음화면으로 이동한다.
이 화면에서 레포지토리에서 사용할 setcret을 설정할 수 있다.
필요한 secret을 설정하면 다음과 같은 화면이 된다.
UNITY_LICENSE의 경우 파일 탐색기에 %programdata%를 입력하여 이동한 뒤 Unity폴더에 들어가면 다음과 같은 파일을 확인할 수 있다.
이 파일이 유니티 라이선스파일이다.
이를 메모장이나 편집기로 열어 모든 내용을 복사하여 등록하면 된다.
설정이 완료되면 다음 화면을 볼 수 있다.
UnityBuildTest Action으로 이동하여 브랜치의 workflow를 실행하면 된다.
빌드가 완료되면 Artifacts에서 다운로드할 수 있다.
Plasticscm
유니티에서 제공하는 형상관리 툴이다.
Plastic SCM - The Distributed Version Control for Big Projects
Looking for Plastic SCM? Plastic SCM was acquired by Unity in 2020 and is now a part of Unity DevOps, a modular solution from Unity Gaming Services. Unity DevOps is a tool specifically tailored for the rigors of game development, and gives users access to
www.plasticscm.com
설치를 진행하다 다음과 같은 창이 뜬다면 왼쪽은 개발자용, 오른쪽은 비개발자용이라고 생각하면 된다.
이제 유니티 프로젝트를 Version Control을 사용하도록 설정하면 PlasticSCM을 사용할 수 있다.
사용법은 git과 유사하다.
심지어 Unity Editor에 있는 창으로도 사용할 수 있다.