Hi, sorry if this has been asked before.
I am just getting into Unity since some days. As a long time web programmer I have a little experience with Objective-C and especially Javascript. I understand that in Unity you can program in both languages.
Are there any rules when to use which language? The JS Scripts are generally used for defining behaviours from what I understand, but in which cases do you use Obj-C ?
Any pros / cons / rules to the two approaches or links would be appreciated…
No, you can’t program in Objective-C. You’re thinking of C#.
In any case, Unity’s Javascript implementation will take a little getting used to- it’s not quite ‘stock’.
Both languages are used for the same things. They are simply two different alternatives for the same goal.
The pros and cons of the two languages really depend on personal preference. I use C# because I don’t like the fact that UnityScript is pretty much unique (and I’m not too fond of JavaScript anyway), but that’s only one way of looking at it.
Objective C is used to develop applications for the Apple products. And JavaScript is mainly used for the web-development. Unity scripting is unique. Certain things are developed by the Unity developers. And the implementation is according to the personal preference (Unity3D gives the option to code in JavaScript, C# and Boo). As I have said, it is your own preference.