Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
955 views
in Technique[技术] by (71.8m points)

unity3d - Why can't I see .Net 4.6 option for API Compatibility Level?

I am new to Unity. I want to use the latest version of .Net. It seems as though the .Net version has only very recently been upgraded to .Net 4.6 as described in this blog post: https://forum.unity3d.com/threads/upgraded-mono-net-in-editor-on-5-5-0b4.433541/. I do not see .Net 4.6 in the API compatibility level setting described in the blog post. I have tried this with Unity 5.5.2f1 and Unity 5.6.0b9. What might I be missing?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I want to use the latest version of .Net.

You can't with the official Unity version.

It seems as though the .Net version has only very recently been upgraded to .Net 4.6 as described in this blog post:

That is a special version of Unity that is only used for experimental purposes. That is not meant to be used to ship your finished game.

.Net 4.6 is not officially supported yet. It's been worked on and will likely be supported by the end of this year.

You can use the unofficial/experimental version 5.6.0b5 from this link. It will let you use .Net 4.6 on the Editor. It will not work on builds because the run-time for other platforms are not yet finished.

If you download this, you are helping Unity improve their .Net 4.6. Don't download it because you want to release your game with APIs' from .Net 4.6.

EDIT:

For the latest experimental release, Windows, OSX, Linux standalone iOS with IL2CPP Android with IL2CPP and Mono are now supported.

Although, there are still bugs to fix, and many platforms are not yet supported. That's why you should not release your game with this.

EDIT 2:

Unity 2017.1.0b1 is now released and it supports .NET 4.6. It is still in beta mode.

Go to Edit --> Project Settings --> Player --> Other Settings --> Configuration --> Scripting Runtime Version --> .NET 4.6 Equivalent

then

Go to Edit --> Project Settings --> Player --> Other Settings --> Configuration --> Api Compatibility Level --> .NET 4.6


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...