x


UnityScript won't compile in MonoDevelop, but C# does

I wonder if MonoDevelop can compile UnityScript? I'm using Unity 3.3, default MonoDevelop ship with it (Mac).

If I left some error in js file, the Build Output window shows no error. But UnityEditor did report errors when click Play button. However, C# can be compiled correctly with MonoDevelop.

Building: SimpleGame (Debug)
Building Solution SimpleGame
Building: SimpleGame (Debug)
Performing main compilation...
...
Build complete -- 0 errors, 0 warnings

If I double click the References > UnityScript.dll. it shows me below errors (can't load:Bool.Lang.Userful...)

alt text

Is this a bug of Unity?

Updated: some guus on Unity forum confirmed that the UnityScript won't compiled in MonoDevelop.

more ▼

asked Mar 30 '11 at 03:30 AM

Favo Yang gravatar image

Favo Yang
80 6 6 13

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

3 answers: sort voted first
more ▼

answered Apr 07 '11 at 11:34 AM

Favo Yang gravatar image

Favo Yang
80 6 6 13

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

Monodevelop doesn't support Unityscript. I'm using UnityScript Editor but it's Windows only. http://www.arsoftware.co.uk/products/unityscript-editor

EDIT: My bad, really sorry, it didn't support UnityScript auto completion when it first came out. It does support it now.

more ▼

answered Mar 30 '11 at 10:20 AM

Sarper Soher gravatar image

Sarper Soher
1.6k 1 4 16

MonoDevelop does support UnityScript, pretty well too actually

Mar 30 '11 at 11:34 AM Mike 3

The one shipped with Unity doesn't support it as far as I know, does it support UnityScript with all it's features like auto completion etc.? I would consider switching to MonoDevelop if it does.

Mar 30 '11 at 01:28 PM Sarper Soher

Mike thanks for the information, it works great and I'm switching to MonoDevelop too :)

Mar 30 '11 at 01:45 PM Sarper Soher
(comments are locked)
10|3000 characters needed characters left

Make sure your javascript bugs are able to be compile time checked

It's very easy to add in dynamic errors, which look reasonable in js up until the line is hit

Adding #pragma strict at the top of your files should help somewhat there

more ▼

answered Mar 30 '11 at 11:36 AM

Mike 3 gravatar image

Mike 3
30.5k 10 65 253

Hi Mike, my problem is the static syntax analyzing (compile) don't work with any .js file in MonoDevelop. How to make the js "compile time checked"?

Mar 31 '11 at 05:17 AM Favo Yang

By that, I mean code in a way which doesn't allow for dynamic invocation. The usual trick is to add #pragma strict to the top of your files.

Mar 31 '11 at 09:52 AM Mike 3

Added #pragma strict to the top of js file, but it still don't get compiled. I wonder this is a bug of MonoDevelop ship with Unity 3.3

Mar 31 '11 at 04:25 PM Favo Yang
(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:

x3459
x377
x74

asked: Mar 30 '11 at 03:30 AM

Seen: 1796 times

Last Updated: Apr 07 '11 at 11:33 AM