PageSourceSearch

https://game.ci/assets/js/70c4ff08.90ef002e.js

js game.ci collected 2026-09-25 18:54:49 UTC 6,751 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkgame_ci=self.webpackChunkgame_ci||[]).push([[2617],{61720:(t,e,i)=>{i.d(e,{Z:()=>r});var a=i(87462),o=i(67294),n=i(22004);const r=t=>o.createElement(n.Z,(0,a.Z)({width:"100%",height:"500px"},t))},50262:(t,e,i)=>{i.r(e),i.d(e,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>r,metadata:()=>s,toc:()=>p});var a=i(87462),o=(i(67294),i(3905)),n=i(61720);const r={},l="Getting started",s={unversionedId:"gitlab/getting-started",id:"version-3/gitlab/getting-started",title:"Getting started",description:"This guide will demonstrate how to setup build and test automation for your Unity project hosted on",source:"@site/versioned_docs/version-3/05-gitlab/01-getting-started.mdx",sourceDirName:"05-gitlab",slug:"/gitlab/getting-started",permalink:"/docs/3/gitlab/getting-started",draft:!1,editUrl:"https://github.com/game-ci/documentation/tree/main/versioned_docs/version-3/05-gitlab/01-getting-started.mdx",tags:[],version:"3",sidebarPosition:1,frontMatter:{},sidebar:"defaultSidebar",previous:{title:"GitHub Checks",permalink:"/docs/3/github-orchestrator/advanced-topics/github/github-checks"},next:{title:"Activation",permalink:"/docs/3/gitlab/activation"}},c={},p=[{value:"Overall steps",id:"overall-steps",level:2},{value:"First time using Gitlab CI?",id:"first-time-using-gitlab-ci",level:2},{value:"Supported versions",id:"supported-versions",level:2},{value:"Video tutorial",id:"video-tutorial",level:2},{value:"Setting up gitlab-ci for your Unity project",id:"setting-up-gitlab-ci-for-your-unity-project",level:2},{value:"I don't have a Unity project yet",id:"i-dont-have-a-unity-project-yet",level:3},{value:"I already have my own Unity project",id:"i-already-have-my-own-unity-project",level:3}],d={toc:p},u="wrapper";function m(t){let{components:e,...i}=t;return(0,o.kt)(u,(0,a.Z)({},d,i,{components:e,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"getting-started"},"Getting started"),(0,o.kt)("p",null,"This guide will demonstrate how to setup build and test automation for your Unity project hosted on\ngitlab using gitlab-ci."),(0,o.kt)("h2",{id:"overall-steps"},"Overall steps"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Understand how ",(0,o.kt)("a",{parentName:"li",href:"https://docs.gitlab.com/ce/ci/"},"gitlab-ci")," works."),(0,o.kt)("li",{parentName:"ol"},"Configure a license for Unity."),(0,o.kt)("li",{parentName:"ol"},"Add build scripts and integrations in your Unity project"),(0,o.kt)("li",{parentName:"ol"},"Set up a gitlab-ci pipeline for your project."),(0,o.kt)("li",{parentName:"ol"},"Result: Accept merge requests with more confidence.")),(0,o.kt)("h2",{id:"first-time-using-gitlab-ci"},"First time using Gitlab CI?"),(0,o.kt)("p",null,"Read the official documentation about\n",(0,o.kt)("a",{parentName:"p",href:"https://docs.gitlab.com/ce/ci/quick_start/"},"Getting started with GitLab CI/CD"),"."),(0,o.kt)("p",null,"Any subsequent steps assume you have read the above."),(0,o.kt)("h2",{id:"supported-versions"},"Supported versions"),(0,o.kt)("p",null,"The ",(0,o.kt)("a",{parentName:"p",href:"https://gitlab.com/game-ci/unity3d-gitlab-ci-example/"},"unity3d-gitlab-ci-example project")," is\nbased on ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/game-ci/docker/"},"unity3d")," docker images from\n",(0,o.kt)("a",{parentName:"p",href:"https://github.com/game-ci"},"game-ci"),". Any version in the\n",(0,o.kt)("a",{parentName:"p",href:"https://hub.docker.com/r/unityci/editor/tags"},"docker hub ",(0,o.kt)("inlineCode",{parentName:"a"},"unityci/editor")," tags list")," can be used to\ntest and build projects."),(0,o.kt)("p",null,"It's generally considered good practice to use the same Unity version for your CI/CD setup as you do\nto develop your project."),(0,o.kt)("h2",{id:"video-tutorial"},"Video tutorial"),(0,o.kt)(n.Z,{url:"https://www.youtube-nocookie.com/embed/k0NcedDzEqA",mdxType:"Video"}),(0,o.kt)("h2",{id:"setting-up-gitlab-ci-for-your-unity-project"},"Setting up gitlab-ci for your Unity project"),(0,o.kt)("h3",{id:"i-dont-have-a-unity-project-yet"},"I don't have a Unity project yet"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Fork\n",(0,o.kt)("a",{parentName:"li",href:"https://gitlab.com/game-ci/unity3d-gitlab-ci-example/"},"the unity3d-gitlab-ci-example project")),(0,o.kt)("li",{parentName:"ol"},"Clone the fork you just created locally"),(0,o.kt)("li",{parentName:"ol"},"Continue to activation instructions")),(0,o.kt)("h3",{id:"i-already-have-my-own-unity-project"},"I already have my own Unity project"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Clone\n",(0,o.kt)("a",{parentName:"li",href:"https://gitlab.com/game-ci/unity3d-gitlab-ci-example/"},"the unity3d-gitlab-ci-example project")),(0,o.kt)("li",{parentName:"ol"},"Copy\n",(0,o.kt)("a",{parentName:"li",href:"https://gitlab.com/game-ci/unity3d-gitlab-ci-example/-/blob/main/.gitlab-ci.yml"},(0,o.kt)("inlineCode",{parentName:"a"},".gitlab-ci.yml")),"\nto the root of your repository,\n",(0,o.kt)("a",{parentName:"li",href:"https://gitlab.com/game-ci/unity3d-gitlab-ci-example/-/blob/main/Assets/Scripts/Editor/BuildCommand.cs"},(0,o.kt)("inlineCode",{parentName:"a"},"Assets/Scripts/Editor/BuildCommand.cs")),"\nand ",(0,o.kt)("a",{parentName:"li",href:"https://gitlab.com/game-ci/unity3d-gitlab-ci-example/-/blob/main/ci"},(0,o.kt)("inlineCode",{parentName:"a"},"ci")," folder")," to your\nproject:")),(0,o.kt)("p",null,"Assuming you've cloned the example project in the parent folder of your project, and your Unity\nproject is at the root of your repository, execute these commands from the root folder of your\nproject:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"mkdir -p Assets/Scripts/Editor/\ncp ../unity3d-gitlab-ci-example/.gitlab-ci.yml ./\ncp -r ../unity3d-gitlab-ci-example/ci ./\ncp ../unity3d-gitlab-ci-example/Assets/Scripts/Editor/BuildCommand.cs ./Assets/Scripts/Editor/\n")),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Open and edit the\n",(0,o.kt)("a",{parentName:"li",href:"https://gitlab.com/game-ci/unity3d-gitlab-ci-example/-/blob/main/.gitlab-ci.yml"},(0,o.kt)("inlineCode",{parentName:"a"},".gitlab-ci.yml")),"\nyou copied to your project and update\n",(0,o.kt)("a",{parentName:"li",href:"https://gitlab.com/game-ci/unity3d-gitlab-ci-example/-/blob/main/.gitlab-ci.yml#L7-13"},"the variables"),"\nwith the versions you need. Your Unity project version can be found in\n",(0,o.kt)("inlineCode",{parentName:"li"},"ProjectSettings/ProjectVersion.txt"),"."),(0,o.kt)("li",{parentName:"ol"},"If your Unity project is not at the root of your repository, also update UNITY_DIR variable."),(0,o.kt)("li",{parentName:"ol"},"Continue to activation instructions")))}m.isMDXComponent=!0}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.