Skip to content

Instantly share code, notes, and snippets.

@pflannery
Last active January 26, 2020 00:02
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pflannery/9a03c174df22098f6904ead5230cfc94 to your computer and use it in GitHub Desktop.
Save pflannery/9a03c174df22098f6904ead5230cfc94 to your computer and use it in GitHub Desktop.
Setup C# 7.x compilation in Unity 2018.2 and Visual Studio 2017

Set the unity scripting runtime to ".NET 4.x Equivalent"

In Unity goto "Edit->Preferences->Player" then find and set "Scripting Runtime Version*" to ".NET 4.x Equivalent"

Install Unity's IncrementalCompiler

In Unity:

  • Goto "Window->Package manager->All" then find and install the IncrementalCompiler
  • Goto "Unity Preferences->Compiler" and set "Enable building from IDE" to True

Setup C# 7.x compilation with Visual Studio 2017 tools

In Visual Studio 2017:

  • Goto "Tools->Options->Tools for Unity" and set "Access to project properties" to True
  • Then from the solution explorer right click the project and goto "Properties->Build->Advanced" and set language version C# 7.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment