Skip to main content

VS Code

To use TypeScript in a Unity project, it is required to use an IDE (Integrated Development Environment) to write the code in. It is highly recommended to use VS Code because it has Genies tools for autocomplete, debugging, and much more.

Setting Up

Download VS Code

Download the latest version of VS Code here: https://code.visualstudio.com/

Extensions

In VS Code, open the left side Extensions tab. Install the Unity and TypeScript extensions for VS Code.

Extensions

Tips and Tricks

Reset VS Code

If VS Code is experiencing issues with TypeScript such as not autocompleting or throwing errors for vector operations, then follow these steps:

Here is a step by step to resetting VS Code to correct version:

  1. Close and reopen VS Code.
  2. Make sure the VS Code file parent directory is opened at the Unity project folder.
  3. At the top input field, type > TypeScript: Select TypeScript Version.
  4. Select the Workspace option from the dropdown menu.

VSCode Reset

Debugging

Check out the Debugging with VS Code page for more information.

Autocomplete Lifecycle Events

You can autocomplete lifecycle events when you begin typing the names, like so:

Autocomplete