Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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 destructor465 · Jul 31, 2016 at 12:21 PM · scripting problemmono.netbackenddot net

Unity .net framework 4.5

Hi all! I have some questions here:
1. Why unity uses outdated mono-2.x scripting backend, Currently mono 4.2 is out, why unity not using it?
2. Why I can't just choose libraries like .net framework 4.5??
3. Current my code requires at least .net framework 4.0, so in unity it has many errors. There's any way to solve this?? without converting my code to .net framework 2.0

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

1 Reply

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

Answer by Treiger · Jul 31, 2016 at 03:05 PM

  1. They can't just update it, there is a lot of work that needs to be done on the back end before that happens, like their IL2CPP system. If I recall, they use a custom version of mono-2.x as well, to maintain platform compatibility.

  2. There are many features that just aren't compatible due to the outdated compiler and the fact that it has around .Net 2.0/3.5 compatibility. Read more here: http://blogs.unity3d.com/2014/05/20/the-future-of-scripting-in-unity/

  3. Not that I know of. If you're willing to wait a couple years, then it'll be solved. If you aren't, start converting.

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 Bunny83 · Jul 31, 2016 at 04:15 PM 0
Share

Also note there's a difference between actual "framework features" and "compiler features". If you have some code that was written for a newer C# version it might not compile inside Unity but you might be able to compile it in Visual studio using .NET 2 (maybe 3.5 will work as well). If it compiles there you can simply place the compiled assembly into your project and it should work. Since you can only use things that .NET 2 provides it will work in Unity just fine, even when you used newer compiler features.

The only alternative if the above doesn't work is to port things down to .NET 2.0. Some things might be easy to fix, others might require huge workarounds but essentially it should always be possible. The question is how much time you have and how important it is. I wouldn't wait for a $$anonymous$$ono upgrade in Unity. Some wait for that upgrade for years ^^.

This wasn't ment as critique on Unity. I know how hard it can be to switch to a complete new framework, especially if you consider how many platforms Unity supports. The used framework has to work on all of them.

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.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

how to reference a .NET 4 targeted, native code wrapper assembly in Unity (beta)? 0 Answers

System.Threading.Tasks 1' does not exist in the namespace 'System.Threading.Tasks' 1 Answer

Is it possible to reference .NET references and give up cross-platform? 1 Answer

Target Platform for .NET DLLs, And Should I Use Linq? 0 Answers

Delegate Covariance and Contravariance using .NET 4.x Equivalent 2 Answers


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