Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
894 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 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...