I am just beggining with unity and i am going to prototype a vehicular combat game. I have decided to use the tutorial on the unity website as the base code for the behaviourand control of the vehicle, these scripts are already provided with the tutorial in javascript.
However i am not very comfortable with javascript, not enough to be able to write all of my scripts in it, i am much more comfortable using C# and i have a 12 week time limit to achieve a working prototype so i don't have a lot of time to become comfortable with javascript.
My question is this: is it possibble to have scripts in 2 different languages, javascript and c# in the same game project? While i wouldn't change scripting languages within the same script file a game object may have scripot files using both languages, is this possible?
P.S. I am aware this is not the proper, clean or best way to achieve what i want but time is a factor, and the focus is on getting a working prototype even if it is "quick and dirty". I would work on converting the code to one language at a later date when i have time.
You can use scripts from both languages in the same project. I've seen Eric5h5 suggest that you read the script compilation reference page when mixing languages.
Accessing a variable defined in C# from Javascript
To access variables defined in C# scripts the compiled Assembly containing the C# code must exist when the Javascript code is compiled. Unity performs the compilation in different stages as described in the Script Compilation section in the Scripting Reference. If you want to create a Javascript that uses classes or variables from a C# script just place the C# script in the “Standard Assets”, “Pro Standard Assets” or “Plugins” folder and the Javascript outside of these folders. The code inside the “Standard Assets”, “Pro Standard Assets” or “Plugins” is compiled first and the code outside is compiled in a later step making the Types defined in the compilation step (your C# script) available to later compilation steps (your Javascript script).
In general the code inside the “Standard Assets”, “Pro Standard Assets” or “Plugins” folders, regardless of the language (C#, Javascript or Boo), will be compiled first and available to scripts in subsequent compilation steps.
What Marowi said was true. As an added fact (which you'll also find in the link Marowi provided), you should be wary of how your scripts access different objects defined in scripts of other languages.
If you haven't already, I suggest you read the page in the link, everything's right there.
That link is busted :(
– mikelyonsthis might be it http://docs.unity3d.com/Documentation/Manual/ScriptCompileOrderFolders.html and this http://docs.unity3d.com/412/Documentation/Manual/Scripting.html
– paulygons