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
20
Question by jashan · Dec 02, 2009 at 04:51 PM · scriptingbasicsmonolanguageframework

What is Mono? Is it a compiler? A language? Or what?

This is a question originally posted to the forums in Boo, C# and JavaScript in Unity - Experiences and Opinions by Godheval that I felt was of general interest, so I'm reposting (and answering) it here:

Godheval asked:

All this stuff about Mono totally confuses me. Is Mono a compiler? And speaking of compilers, can I learn all I need to learn of C# to use Unity with Visual C# Studio Express? Or do I need the full version?

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
13
Best Answer

Answer by ericksson · Dec 02, 2009 at 05:02 PM

The answer is here: http://www.mono-project.com/What_is_Mono. Mono has a C# compiler, a runtime and a lot of libraries.

And this is the Unity3D page explaining how to integrate Unity with Visual C# (separated explanation for different Vsiual Studio C# editions): http://unity3d.com/support/documentation/Manual/VisualStudioIntegration.html

Also, you can learn C# from anywhere (a book, internet tutorials, etc.), but for basic Unity coding you need to know the C# basics. Then, learn the Unity API (using Unity's API and Scripting Reference) and putting this knowledge together you can get up and running with Unity scripting using C# pretty fast.

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
33

Answer by jashan · Dec 02, 2009 at 05:22 PM

Mono is a development framework which is equivalent with the .NET Framework (which obviously also is a development framework). A very similar development framework or "plattform" is Java (.NET is called ".NET Framework", Java is called "Java Platform"). I think it's important to understand that "Java" is not just a programming language. It's also a programming language - but the interesting thing about Java (IMHO) isn't so much the language but the APIs (application programming interface) that are an integral part of the Java Platform. An "API", btw, is what you see when you open the Scripting Reference of Unity (that is the documentation of the API that Unity provides).

Oh: And Java has nothing to do with JavaScript (well, except for some marketing purposes in the very early days).

In both cases (Java and .NET), there's different versions of the framework / platform: For Java it's J2ME, J2SE and J2EE (for mobile development, "standard development" and "enterprise development"). With .NET, I'm aware of "general .NET" and .NET compact framework. Java is available for most platforms but only supports a single language (I think there's projects that compile other languages into Java-bytecode but that's just not that common). .NET "by design" supports multiple languages, for example C#, Visual Basic, C++, a dialect of Java and many others.

The Java platform is implemented for many different computer platforms (it was "designed" to be "platform independent"). .NET is available for Windows only - but another implementation of the .NET framework - called Mono - is available cross-plattform (Windows, Mac OS, Linux ... probably other OSs I'm not aware of). In principle, Mono is just another implementation of the framework specified with the .NET framework (in practice, I think Mono is a lot more but to keep things simple I'll stay with "in principle" ;-) ).

Development frameworks / platforms usually provide SDKs (software-development kits), and SDKs usually provide compilers. Both .NET/Mono and Java also provide a special kind of "runtime environment", so the programs are not directly executed on the processor but actually by another program. That's how (operating system)-platform independence, and even processor-architecture independence is achieved. That was also (according to my knowledge) the first time the term "virtual machine" was used very widely: The Java runtime environment is in fact called "virtual machine" (while by now, most people would use "virtual machine" for virtualization environments like VMWare or Parallels). Such a "virtual machine" executes "bytecode" which is an intermediary language the original code (written in a programming language like Java (the language), C#, C++, Visual Basic, Boo or JavaScript) is compiled into. So, bytecode is in-between assembly-code (or actually: binary machine code) and a high-level language like C# etc.

Now, there's one very important thing to know regarding Mono and Unity: Unity is not built on top of Mono. If that was the case, Unity would be cross-plattform by nature (there would be a Linux version ... or it would be comparatively easy to create one). Unity is a "native" application built - I think ... mostly - in C++. However, Unity uses Mono as its scripting framework. Which is quite a genius thing because .NET or Mono is a very powerful programming framework - and by having that integrated into Unity you can tap into the whole of this power.

The C# available in Unity (currently, in 2.6) is pretty much the same available in Visual Studio 2005 (that's when Microsoft introduced the .NET Framework 2.0 which is essentially what's available in Mono 1.2.5 which is what Unity currently uses). The current version of Visual Studio (2008) supports the .NET Framework 3.5 in which C# has quite a few extra-features that are currently not available in Unity; which will very likely change "somewhat soonish" because Mono 1.2.5 is really old...

For the language, C#, Visual Studio 2005 and Unity are "pretty much the same". However, when developing with Unity, what matters more to you than the language is the API. And, in addition to what the .NET Framework provides, Unity provides its own API which is documented in the scripting reference (see above).

So, what I'd recommend for learning C# (if you're new to programming and don't want to overwhelm yourself): First learn C# by doing C# tutorials for beginners, and use the "somewhat simpler" environment that Visual Studio provides (Express is fine for that). Once you feel comfortable with the core concepts of programming (object oriented programming, to be exact), switch over to Unity. There's also a very nice tutorial for C# on the Wiki which covers the basics of programming and C# - and does so in the context of Unity. So that's a really good resource to start with.

Comment
Add comment · Show 8 · 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 fireDude67 · Jan 08, 2011 at 08:03 PM 2
Share

Do you always answer your own questions?

avatar image Eddie 2 · Mar 15, 2011 at 03:38 AM 0
Share

Thanks for the clear explanation~~ :)

avatar image dingben · Oct 05, 2011 at 06:01 PM 0
Share

Thank you, nice write-up... do take a look at:

[~~~ ework", Java is called "Java Platform"). I think it's important to understand that "Java" is not just a program$$anonymous$$g language. It's also a program$$anonymous$$g language - but ~~~]

avatar image BerggreenDK · Mar 16, 2012 at 08:27 PM 2
Share

Just $$anonymous$$or detail: $$anonymous$$ONO is the OpenSource implementation of .NET - made 100% by community from the open specifications $$anonymous$$icrosoft have published for .NET - so, unless you use Windows specific API calls such as Winforms, you will be able to reuse almost any .NET code in $$anonymous$$ONO.

That is extra great if you find some good examples writting in C# for .NET, as they usually are very easy to use with $$anonymous$$ONO Framework.

$$anonymous$$ONO is usually a little behind the latest release of .NET regarding implementation of new features. Eg. LINQ-to-SQL came a bit later I think.

avatar image chenyong · Apr 19, 2013 at 03:00 AM 0
Share

mark tks!!!

Show more comments
avatar image
0

Answer by LyalinDotCom · May 31, 2016 at 01:25 PM

It's also worth noting here that Visual Studio 2015 Community edition is now the best way for many people to get the editor "for free", though please check the license for details, as its not for everyone, licensing details are here.

You can learn all the details about how to get both Unity and Visual Studio 2015 in our Unity page: https://www.visualstudio.com/en-us/features/unitytools-vs.aspx

For full transparency, i work on the Visual Studio team but just thought this was useful to add into the discussion.

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

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

7 People are following this question.

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

Related Questions

Explanation of the System and Mono Namespaces 1 Answer

Change MonoDevelop c# compiler output language 1 Answer

What are the Syntax Differences in C# and Javascript? 7 Answers

how can use GUI.Button? framework don't recognize or suggest the method 1 Answer

Unity 5.3.1 and Visual Studio 2015: Project Target Framework Not Installed Error Message? 4 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