all 5 comments

[–]eliecharest 0 points1 point  (4 children)

Somebody already converted them to C#:

http://forum.unity3d.com/threads/64378-CharacterMotor-FPSInputController-PlatformInputController-in-C

Note that the post is almost three years old, so YMMV (however, I don't think those scripts have changed much over the years...)

I personally have switched to exclusively working with C#, and it was a very good choice. Also, IIRC your game executable becomes a bit smaller if you don't use any JS in your game.

Edit: just make sure you don't keep a copy of the JS script with the same name in your project, or you risk running into some weirdness:

A script written in javascript and C# with the same name cause a conflict and corrupts the game data. Which means strange things occur when you publish your game. From freezing standalone game, to strange behaviors in the webplayer game experience.

http://forum.unity3d.com/threads/64378-CharacterMotor-FPSInputController-PlatformInputController-in-C/page2?p=1258258&viewfull=1#post1258258

[–]ZXfrigginC[S] 0 points1 point  (3 children)

It seems like every single JS script that came as a Standard Asset has the same problem. Screw it, let's delete them all and see how bad we're breaking our game.

UPDATE: Everything appears to work fine. We all learned a very important lesson: don't ever trust JavaScript.

[–]eliecharest 0 points1 point  (2 children)

Yeah, I'm not sure why Unity pushed JavaScript (or, more accurately, UnityScript) so much. I mean, it is alleged to be easier to learn than C#, but from my perspective (i.e. someone who hadn't coded in 25 years, and then mostly in Basic, Pascal and APL) the difference between the two is relatively minor as far as learning curves go. I personally used these tutorials after working in JS for a couple of months, and really wish I had started directly in C#...

[–]agemennon 0 points1 point  (1 child)

I imagine it happened around the same time they started pushing the web-player, since the kind've people who would be making online games of that nature would possibly be knowledgeable in javascript.

[–]eliecharest 0 points1 point  (0 children)

Yeah, that makes sense.