x


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

Fattie gravatar image

Fattie
26.9k 317 675 397

(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

Statement gravatar image

Statement
25.8k 76 108 238

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

By RSS:

Answers

Answers and Comments

Topics:

x479

asked: Apr 29, 2013 at 08:54 AM

Seen: 509 times

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