Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

Clarification on what C# scripting means

Discussion in 'Scripting' started by punkouter, Oct 8, 2009.

  1. punkouter

    punkouter

    Joined:
    Jun 16, 2009
    Posts:
    84
    So does c# script mean you use all the c# keywords but non of the base class libraries?

    Is there a plan to implement the base class libraries?

    Isnt that what mono is? And if that is open source could that be of help ?

    Is c# scripting stuck on c#.net version 1.1 for both PC and unity iphone ?

    and who uses BOO anyways?
     
  2. Timmer

    Timmer

    Joined:
    Jul 28, 2008
    Posts:
    330
    It's C# running on Mono. I forget the version of Mono but I know it's a slightly older one.

    You can use many of the core libraries.

    I use Boo.
     
  3. punkouter

    punkouter

    Joined:
    Jun 16, 2009
    Posts:
    84
    When you say CORE libraries.. do you mean the BCL?


    How do I know know if I can use for example System.Net. .etc ?
     
  4. jeremyace

    jeremyace

    Joined:
    Oct 12, 2005
    Posts:
    1,661
    Yes, you can use most. Remember that it is a Mono runtime and not the MS one, so some things still don't work properly. The binary compression classes are one of them, for example.

    Your best bet is trial and error. Load the NS and try to create a class or invoke a static member and see if Unity complains.

    Also note that for security, certain features are disabled in the webplayer, such as the file IO routines.

    -Jeremy
     
  5. punkouter

    punkouter

    Joined:
    Jun 16, 2009
    Posts:
    84
    makes me think of more questions..

    So how do I find out what BCL are there for the c# script ? is there mono documentation for that? And if so then what version of mono do I reference?

    Why is it c# 'script' anyways?? what makes it 'script' ?

    Since c# script has all this BCL stuff .. what does javascript have?? And if it doesnt have all the c# BCL stuff then why isnt everyone using C# script ?

    I haven't seen any c# examples yet that use any of the BCL classes..

    Also, kind of off topic but .. why can't I trace and debug like VS2008 ? That is the number thing I would like to see since it makes it easier to understand code flow..
     
  6. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,603
    Its Mono 1.2.5, so primarily .NET 2.0 with some 3.0 and some 2.0 parts missing.

    Its scripting because you have no source access to the engine to alter how the engine works. You only add functionality that the engine then executes through the "callbacks".
    Sure its realistically seen still programming but scripting sounds nicer and less scary and as you don't have to work with tens of tousands of lines of code to get anywhere (nor could you if you wanted to with the store available licenses), it makes kind of sense to call it "scripting".
    Its also in line with unityscript and Boo that way


    and you can't trace and debug because mono 1.2.5 just doesn't have anything alike. that simple it is :)
    UT plans to upgrade to 2.x in a future version but that will take some time due to incompatibilities between mono 1 and 2, as mentioned on the uservoice entry on that.


    I would recommend to just trial and experience it.
    Answers many questions on its own
     
  7. punkouter

    punkouter

    Joined:
    Jun 16, 2009
    Posts:
    84
    yes. I am trying it now and reading the manual slowly..

    Im still wondering why if mono 1.2.5 has all these base class libraries.. how come no one seems to be using them..

    I guess its cause there is no need to and things are done through the unity objects

    So when unity upgrades mono will it make sense to use WCF classes to call web services rather than however unity does it (www classes?)