• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Xavier78 · Dec 17, 2018 at 12:29 AM · monocompiler

How do you enable roslyn compiler and c#7.3 in unity 2018.3

So I just upgraded to unity 2018.3, and want to use "where T : system.Enum" for generics, but can't seem to get unity to switch to roslyn. I changed my settings to
"Scripting Runtime Version = .net 4.x Equivalent"
"Api Compatibility Level = .net 4.x Equivalent"
But "ScriptingBackend" still only has Mono, and IL2CPP. What do I need to do to use Roslyn? NOTE: the c#7.3 in the app header was just what I named the copy of my project, not actually using c#7.3 yet. alt text

unitybug.png (116.1 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Vega4Life · Dec 17, 2018 at 03:43 AM

With 2018.3 it should be default. As the scripting runtime is automatically set to .Net 4.x.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Xavier78 · Dec 17, 2018 at 04:31 AM 0
Share

I thought so, but I think my unity is bugged after looking at https://docs.unity3d.com/$$anonymous$$anual/CSharpCompiler.html
$$anonymous$$y only settings for "Scripting Runtime Version" are 3.5 and 4. and no "c# compiler" selletion or "C# language version" and this is new install. I can try making a new project, maybe some unity cached settings somewhere?

avatar image Vega4Life Xavier78 · Dec 17, 2018 at 04:36 AM 0
Share

It should say 3.5 Deprecated, and there should be a 4.x equivalent. The 4.x is what you want to set it to. In the beta they had it as 4.6. They must have changed it.

avatar image Xavier78 Vega4Life · Dec 17, 2018 at 04:42 AM 0
Share

And then should the roslyn compiler be set automaticly with that? because I see no feild called "C# compiler" like they suggest in that document.

Show more comments
avatar image
0

Answer by GregoryFenn · Jan 07, 2020 at 06:10 PM

Where is "Scripting Runtime Version"?? I can see the other parameters in the "Edit/Project Settings/Player/Other Settings/Configuration" section, but I can't find "Scripting Runtime Version" (using Windows 10 with editors 2019.2.17f1 and 2019.3.0f1)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
-1

Answer by Cornelis-de-Jager · Dec 17, 2018 at 03:33 AM

The current version for unity is experimental and is DotNet 4.6 + C# 6. To enable C# 7 with unity you will need custom DLLs.

For a tutorial have a look at this video: Click Me

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Xavier78 · Dec 17, 2018 at 04:28 AM 0
Share

Incorrect to my knowledge. https://docs.unity3d.com/$$anonymous$$anual/CSharpCompiler.html

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

99 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Where are the exact technical specifications of the .NET subset Unity 5 compiles projects with? 1 Answer

Where is the Mono C# compiler for Unity iPhone? 1 Answer

Runtime loaded assemblies 1 Answer

AOT compilation problem - ExecutionEngineException - AOT not compiling as expected. 1 Answer

Scripting in inspector, possible? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges