# General knowledge ¶

Unity is a game engine providing support for multiple platforms (Windows, Linux, Mac, Web, Android, iOS). The editor is written in C++, but the scripts (=your code) will be in C#. You can download Unity here.

• unity hub: software to manage unity versions and projects

⚠️ A wise one would regularly save its work, and use a version-control tool too ⚠️

## Pick Unity version 🚀 ¶

Usually you should use LTS (Long-term support) versions of Unity, because they will still receive patches (bugs), while no new features will be added, for 2 years, so they are stable versions.

## Student plan ¶

You may apply for a student plan 📚 (if you are a student).

• go to Unity Student Plan
• click on High school students
• Send a pic of your student ID
• Done, wait a bit, you should receive a mail telling you welcome and how to get started
• Claim your rewards for 1\$ with the code sent by mail (optional)

## Version-control in Unity ¶

Version-control is quite easy to set up. This is a way of keeping backups of your work on a server, so that you don't lose everything if you lost your local version. It may also be used if you are planning to code with a team, but unless you are editing different files, this will be hard to use.

First, create an empty repository (no README/...).

Unity projects are made of a lot of files, including big files too, so you can't commit (~=save) them. Fortunately, you can use Git LFS to transfer big files, and you got a plugin making things easy in unity.

My tutorial
• you may have to install Git (👀)
• you may have to install GitHub LFS
• you got a ".package"
• open your project, and drag and drop it inside the project window (the file explorer, the bottom left panel)
• then click on "import" on the panel that opened
• then you can show the "Git tab" using Window > GitHub

Once the installation is complete, you need to add+commit your files (=save). You can push your saves on the server (=push), or pull the saves on the server (=pull). Check the GIT course if needed.

Things that may be worth remembering
• you do not need to commit Library, Temp, Logs, and Packages (that's why they are in your gitignore)
• do not call a folder Resources (that's for dynamic resources)
• do not commit PSD, blend, 3ds, etc. files (sources). Artists are usually using another tool (ex: Dropbox)
• reduce the resolution of your textures (relatively to their size in-game)
• compress images

Pro tip: Teams should use Unity Teams.

By default, the IDE used by Unity when editing scripts is VSCode. But, you may change this by going in

• edit > preferences > external tools
• pick your IDE / Browse it

Personally, I'm using Rider (features 🚀, paid, free for students). If Rider is not detected

• Search Rider in Windows Search bar
• Right-click > Shown in explorer
• Right-click again > Shown in explorer
• Double-click on the path > copy the path
• Then in Unity, select browser, and paste the path
• Then select "rider64" and you are good to go

Sources: Rider in Unity (2017)
Sources: Rider in Unity (2018)

## Unity Settings ¶

Go to Edit, Then Preferences.

• General > Disable editor analytics: up to you, more info here
• General > Editor Theme: Light/Dark

## Asset Store ¶

This is one of the places that you may use to look for assets. The Asset Store needs you to log in to your unity account to import an asset in the editor. Fortunately, if Unity is open, you can do Window > Asset store, which will open the asset store in your browser and log you.

Once you added an asset to your list of assets, in Unity, you can find your assets in Window > Package manager. Right next to the "+", you can set packages to

• Unity Registry (verified plugins)
• In Project (you can update/remove your packages here)

## Build game ¶

It's release time 🚀? When you picked your unity version, you picked the platforms that you can target. If you didn't, you can go inside the unity hub, then "install", right-click on your unity, and add modules.

Inside Unity, before building something, let's first configure our game. Go to Edit > Project Settings > Player. You could also find the menu in File > Build, the bottom-left button "Player settings...".

• [Should] Set the company name, the product name, the version
• [Could] You may set the icon 🚀 (and multiple icons for each resolution)
• [Could] You can define the initial configuration
• [Should] In Splash image
• you may remove the unity logo (up to you, or you can move it)
Pro tip: it's sometimes advised to check Edit > Project Settings > Quality, because you may be able to reduce your build size quite a lot, mostly by decreasing the number of levels.
Then, you simply have to go to File > Build or File > Build and Run.