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.

3 Answers

3

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.

MonoDevelop does support UnityScript, pretty well too actually

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.

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

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

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"?

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.

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

http://forum.unity3d.com/threads/84406-Will-MonoDevelop-compile-UnityScript-(JS)