Unityscript - static classes. (Now available?)

Say you have a text file “textfile.js”. You include it in your Unity project (but do not attach to a game object.)

In the file you have this:

static class handy
  {
  function findArea(...):blah { blah }
  function makeCoffee(...):blah { blah }
  function guessName(...):blah { blah }
  }

I feel very confused:

I could swear, it was not possible to have static classes in Unityscript … ??

Has this changed recently, or ?

Thanks, experts !!

PS if I’m not mistaken it remains a intriguing factoid that Unityscript is totally undocumented. So if anyone “knows” this (presumably from eg. talking to friends at Unity … or whatever) again thanks.

1 Answer

1

Hi Fattie,

Not sure how recent is “recent” and I personally don’t use UnityScript on a daily basis, but I did try it out with 3.5.6 and everything seemed kosher. Haven’t really thought it ever was missing as a feature (?)

If you’re really intrigued in that, you could go ahead and download the oldest 3.x version you can find in the download archive and try it out :slight_smile:

thanks for the report that it's there in 3.5.6 !!