Class notes · Unity help

Unity Help

All examples in class use Unity 6000.3.11f1 (LTS: Long Term Support release).

Download & installation

Unity version

Use Unity 6000.3.11f1 (an LTS, Long Term Support, release). All examples in class are based on it, so installing exactly this version avoids surprises.

Download and install

Go to the Unity 6000.3.11f1 release page ↗ and click Install to install it through Unity Hub. Other versions are in the Unity download archive ↗. In China, use the 6000.3.11f1 page on unity.cn ↗ instead, and install the same version.

Modules to install

⌨IDE

I'll be using Visual Studio Code (VSC). You're free to use any IDE you like. Unity's default, Microsoft Visual Studio Community, also works very well.

🌐WebGL Build Support

Required: Part 2 of this class, including playtesting, is based on WebGL builds.

⊞Windows Build Support

Mac users: please also install this so you can build a PC EXE that the TA can run for your assignment submissions.

📖Documentation

I'd advise installing this as well.

!! WARNING !! Do not attempt to upgrade Unity during this class, for any reason. Once it's downloaded and working, do not follow new releases!

Debugging

Begin working with Unity

Tutorials to go over yourself, after (or before) class:

Problems Q&A

WebGL build configuration

When you try to run your WebGL build, you may get an error like this:

Browser showing a red error: Unable to load file Build/YourProject.framework.js.br! Check that the file exists on the remote server.
The “Unable to load file … framework.js.br” error.

This setting solved the problem for me (see this discussion ↗; Unity's Deploy a Web application ↗ page explains the compression options). Before building:

  1. Open File › Build Profiles, select Web, and click Player Settings. (Older Unity versions call this window Build Settings.)
  2. Click Player, and under Publishing Settings find Compression Format.
  3. Set it to Disabled.
Unity Player settings, WebGL tab, Publishing Settings with Compression Format set to Disabled
Player › Publishing Settings › Compression Format: Disabled.

Missing Unity API IntelliSense

A few things may be wrong:

  • Check the installed packages: open Window › Package Manager. Under Packages: Unity Registry, scroll down and make sure Visual Studio Editor is installed. It supports both Visual Studio and VS Code. (The older “Visual Studio Code Editor” package is deprecated; you don't need it.)
  • Visual Studio Code: if you use VSC, make sure to install the Unity extension from Microsoft ↗, and follow through with updating the Package Manager.
  • Default editor setting: in Edit › Preferences › External Tools › External Script Editor, make sure this is set to your IDE.
  • First time opening the project: choose Assets › Open C# Project.

UI option missing from the Create menu

You need to add the UnityEngine.UI package: open Window › Package Manager, choose Packages: Unity Registry, and search for Unity UI. Once it's installed, the UI items appear in the Create menu under UI (Canvas).