Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
4
Question by Cyrille-Paulhiac · May 29, 2012 at 06:49 PM · c#monoversionthreading

How to determine Mono version of Unity ?

Hello commUnity,

I am wandering how to surely get the Mono Version for a given Unity3D application ?

Dynamically you only can get that :

 $INSTALLPATH\Unity350f5\Editor\Data\Mono\bin\mono.exe" -V
 Mono JIT compiler version 2.0 (Visual Studio built mono)
 Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
         TLS:           normal
         GC:            Included Boehm (with typed GC)
         SIGSEGV:       normal
         Notification:  Thread + polling
         Architecture:  x86
         Disabled:      none

But according to this post, I only get that information :

Unity 3.2 uses a mono 2.6 (slightly customized with some bug fixes of ours).

So how can we have more precisions on that version and on the "slightly customized " ? (I need these precisions because I think I'm lacking System.Threading.Tasks from this)

Comment
Add comment · Show 2
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 Robnocop · Nov 27, 2013 at 04:30 PM 0
Share

Ok it kind of puts me in the right direction, as I get the same error as with implementing a.NET 4.0 dll. I know Unity should be able to run a .NET 4.0 like mono implementation, at least nowadays. However, I apparently have jit compier 2.0 ins$$anonymous$$d of the current version ( editor\data\mono\bin\mono -V --> jit compire v 2.0). How to fix?

avatar image Benproductions1 Robnocop · Jan 08, 2014 at 12:51 AM 0
Share

This is not a answer to the question, please post your own question if you have one

3 Replies

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

Answer by Ghopper21 · Oct 17, 2012 at 12:01 PM

Here you go (with thanks to the helpful Stack Overflow user who answer my similar question over there):

 Type type = Type.GetType("Mono.Runtime");
 if (type != null)
 {                                          
     MethodInfo displayName = type.GetMethod("GetDisplayName", BindingFlags.NonPublic | BindingFlags.Static);
     if (displayName != null)                   
         Debug.Log(displayName.Invoke(null, null)); 
 }
Comment
Add comment · Show 3 · 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 Cyrille-Paulhiac · Oct 17, 2012 at 06:01 PM 0
Share

Thank you ! it works

avatar image Ryuuguu · Sep 04, 2013 at 09:55 AM 1
Share

You'll need.

using System;

using System.Reflection; to make it work.
avatar image Kylectx · Sep 25, 2014 at 10:54 AM 0
Share

But I used the code above on Unity 3.5.4 and 4.5 .Both told me the version is 2.0,not 2.6.

avatar image
1

Answer by Cyrille-Paulhiac · Jul 08, 2014 at 10:11 PM

Well, I found a more precise solution now (the upper one gives only 2.0 as a result).

Try this line of command:

 ...\Unity\Editor\Data\Mono\bin>monop2 --runtime-version mono.exe

For Unity 4.5.1f3, I obtained "runtime version: 2.0.50727.1433"

We're still quite in the past, aren't we ?

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 Bob_Gneu · May 05, 2017 at 04:09 PM 0
Share

Good Day,

Just ran this against Unity Version 5.6.0f3 and it reports as follows:

 > monop --runtime-version mono.exe
 runtime version: 2.0.50727.1433

and in the editor, using the method described by @Ghopper21 it reports the following:

 2.0 (Visual Studio built mono)
 UnityEngine.Debug:Log(Object)

Also ran against Version 2017.1.0b3, the current beta on their site using the same method as above with the same versions reported.

avatar image
0

Answer by wvdv · Sep 24, 2015 at 04:18 PM

Running

monop --runtime-version mono.exe

returns

runtime version: 4.0.30319.17020

Comment
Add comment · Show 2 · 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 illustir · Oct 14, 2015 at 02:45 PM 0
Share

Is this current? I need to know when googling on stack overflow, which version of C# answers to actually read.

I'm on OS X so I can't run this myself.

avatar image meat5000 ♦ · Oct 14, 2015 at 04:07 PM 0
Share

This is listed as the $$anonymous$$icrosoft .Net version under Runtime

 Runtime:
     $$anonymous$$icrosoft .NET 4.0.30319.34209
     GT$$anonymous$$ 2.24.20
     GT$$anonymous$$# (2.12.0.0)

(Check the About tab in $$anonymous$$ono, being the easiest way to find versions) All assemblies are listed under the Show Loaded Assemblies button.

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

12 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

Related Questions

Which version of mono used in Unity 3.2? 2 Answers

how to connect to mssql in unity for hololesn (Build Setting Error) 0 Answers

What version of Mono does Unity 5 use? 0 Answers

`System.IO.File' does not contain a definition for `AppendText'? 1 Answer

Why do Two Instances of MonoDevelop Open when I double-click a CS file in Inspector? 0 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