Search Unity

UnityScript support for #region

Discussion in 'Wish List' started by Josh_Amsterdam, Jul 11, 2011.

  1. Josh_Amsterdam

    Josh_Amsterdam

    Joined:
    Feb 22, 2011
    Posts:
    68
    First of all, for people who don't know what regions are:

    The language C# has a nice feature, called regions, what these allow you to do is type #region nameOfTheRegion and then later on in your code #endregion. Code within such a region can then be folded - just like code within functions, classes and enums can be. This is very nice when you, for instance, have 50 variables declared at the top of your script.

    You simply have a player region, a level region, etcetera. You can then fold the code you're not currently using, making navigating a lot easier.

    This is extremely easy to implement. So please vote my suggestion up and hope it gets recognized by the UT guys.
     
    Stew_79, jayzomby, ia559918 and 3 others like this.
  2. MarkcusD

    MarkcusD

    Joined:
    Jul 12, 2011
    Posts:
    40
    It already supports this.
     
  3. Josh_Amsterdam

    Josh_Amsterdam

    Joined:
    Feb 22, 2011
    Posts:
    68
    Could you tell me how? Several knowledgeable people I spoke to assure me this is not the case.
     
  4. ar0nax

    ar0nax

    Joined:
    May 26, 2011
    Posts:
    485
    that's one of the reasons i only write in C# in monodevelop \m/
     
  5. MarkcusD

    MarkcusD

    Joined:
    Jul 12, 2011
    Posts:
    40
    If you use mono develop (which comes with Unity) or Visual Studio it works. I'm on windows but I assume monodev supports this on mac.
     
  6. XtremeLeo

    XtremeLeo

    Joined:
    Jun 12, 2011
    Posts:
    7
    I think it is more a feature of the IDE than of the language. As it was already stated it already works in MonoDevelop and Visual Studio (I personally have used it on the latter).
     
  7. ar0nax

    ar0nax

    Joined:
    May 26, 2011
    Posts:
    485
    ^ true dat.