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.

more ▼

asked Apr 29, 2013 at 08:54 AM

avatar image

27.5k 332 695 421

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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 :)

more ▼

answered Apr 29, 2013 at 12:01 PM

avatar image

26.7k 77 144 287

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

Apr 29, 2013 at 01:11 PM Fattie
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Apr 29, 2013 at 08:54 AM

Seen: 609 times

Last Updated: Apr 29, 2013 at 01:11 PM