C# + JS Split Development

Hello,

I’m working on a project using some of the standard asset control scripts (JS), but the rest of the project is going to be C#. I’m wondering what the pros / cons of working in a split development language environment are. Basically I’m wondering if I should spend the time to convert the JS files to C# or not. :slight_smile: I’m still using some of the old camera scripts from 1.7 as well.

From a usability standpoint I’ve found that I can still get at any global vars I might need by keeping the JS files in the standard assets folder. It seems I can’t really use monodevelop to edit both JS and C# easily. There’s a big lag any time I start typing in a JS file which I assume I can fix changing auto-complete settings, but I like how these features work with C# files. So I’ve been using the built-in unitron editor for JS files.

I suppose it’s all compiled down to CIL anyways, so it comes down to my workflow and what I can stand. I’d still appreciate any feedback from you guys about working on projects using both JS and C#.

Thanks a lot!
-d

If it’s a decently sized project, then convert the js files.

Splitting development can cause a lot of headaches because you have to start relying on compile order so that JS is always compiled before C#, until you get something from C# needed in the JS component, in which case you start having to string along compile ordering.

Ouch, good point. I hadn’t thought about compile order… I could see that being an annoying bug to track down later! Thanks for the input.

-d

The compile order part actually only applies if the limitation caused by the lack of dynamic typing vanished on U3, cause with iPhone 1.7, it was not possible to use JS code with C# at all on iOS. It was limited to one way ie JS using C# classes in earlier compile steps

I see. Thanks for the input dreamora.

-d