Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Where is the reference for .net framework?

Discussion in 'General Discussion' started by guitarxe, Aug 12, 2014.

  1. guitarxe

    guitarxe

    Joined:
    Dec 1, 2013
    Posts:
    131
    For any of Unity's classes, if I wanted to find out how, for example, Input.GetAxis works, I would go to the scripting reference on Unity's website and get clear and simple documentation. Which is awesome. Back when I used Flash AS3, Adobe had a similar documentation website.

    But with .NET framework, I can't find any such thing. And the MSDN is an impenetrable maze for me.
    Where can I find documentation similar to Unity's for .NET stuff?
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
  3. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    angrypenguin likes this.
  4. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,738
    I can't recall the last time I have actually gone to either docs.unity3d.com or msdn and started there. I always simply Google it - like if I need the syntax to declaring a List, "C# List generic syntax". 99% of the time it takes me to the exact page I want without having to navigate the "impenetrable maze" of MSDN.
     
    angrypenguin, Ryiah and landon912 like this.
  5. guitarxe

    guitarxe

    Joined:
    Dec 1, 2013
    Posts:
    131
    Oh nice, thanks. Speaking of .NET 4.5 vs .NET 3.5, isn't 4.5 not supported on Windows XP system? So if I were to build a game with .NET 4.5 as the target, it would not run on Win XP?
     
  6. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,738
    Unity uses Mono, not .NET. When you see something like "Unity uses .NET 3.5", you should read it as "Unity uses the version of Mono which is more or less identical to .NET 3.5". If my understanding is correct, the available version of .NET on the target platform is irrelevant.

    That said... Unity uses a version of Mono that's equivalent to .NET 2.0. 4.5 isn't even a choice.
     
    Whippets likes this.
  7. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    It's equivalent to .NET 3.5, not 2.0. For example, LINQ, extension methods, implicit typing, etc. etc. It's true that Unity uses Mono on all platforms including Windows...except WP8, where in fact it does use real .NET (which causes problems because that version of .NET is missing a bunch of stuff that's in the version of Mono used in Unity).

    --Eric
     
  8. Foam

    Foam

    Joined:
    Jun 13, 2012
    Posts:
    322
  9. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,738
    How do you figure it's compatible with .NET 3.5? Everywhere (including within Unity, and @Foam's link) says ".NET 2.0" and subset - what does that version number mean if not the equivalent .NET version?
     
  10. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    I assume that means ".NET 2.0 (or higher)". Because Unity does use those things I mentioned (LINQ and so on), which are not in .NET 2.0. Although it's more accurate to say "approximately .NET 3.5" since not everything matches up exactly.

    --Eric
     
  11. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    .NET 3.5 is actually a superset of .NET 2.0. In fact, 3.5 is part of the 2.0 product and just added a bunch of new functionality (just like 4.5 is really 4.0 but with new goodies).

    In addition to WP8, 4.5 is also used for Windows Store Apps so there are some things to workaround, but 3.5 is what you need to target for the most part.
     
  12. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,738
    ....the only way they could have possibly made their versioning scheme more confusing would be if they'd gone backwards. o_O

    They'd have almost been better off just randomly naming the damn things, for all the sense that makes. ".NET Pineapple is a superset of .NET Chair, just like .NET Pencil is really .NET Iceberg with some new features."
     
    ippdev and Ryiah like this.
  13. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Well I was trying to make it more clear... technically 3.5 is a Subset of 2.0 I guess... not a superset.... It just adds functionality to 2.0.
     
  14. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,616
    yes that definitely would have been better :rolleyes:
     
  15. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,789
  16. npsf3000

    npsf3000

    Joined:
    Sep 19, 2010
    Posts:
    3,830
    Are mostly language features, not framework.
     
  17. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,613
    There's three things going on:

    • The CLR, which is the actual virtual machine and environment your code runs in. .NET 2.0, 3.0, and 3.5 all use CLR 2.0; .NET 4 shipped CLR 4.0. Unity's Mono is effectively CLR 2.0.
    • The .NET Libraries, which are all the System.Whatever namespaces. Each version of .NET has shipped some new libraries. Libraries through to 3.5 all can be run on CLR 2.0; the libraries in .NET 4 require CLR 4.0.
    • The C# language. C# 3.0 code can be compiled to run on the CLR 2.0; C# 4.0 code requires CLR 4.0.
     
    angrypenguin and Mr.T like this.
  18. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    This is also from the company that named it windows 7 even though the version is windows 6.1. Need I even bring up the naming idea for the OneBox to rule them all and in the darkness kinda suck.
     
  19. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,738
  20. Mr.T

    Mr.T

    Joined:
    Jan 1, 2011
    Posts:
    546
    Thanks a lot for that. That info exists in various places of course but it is nice to see it put together in that way
     
  21. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500
    I kind of thought that it meant that .NET 2.0 is the highest fully supported version. It supports a bunch of stuff that's from 3.5, but not all of it, so it doesn't claim 3.5 compatibility. I've never looked to confirm this, though.