Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Apr 02, 2018 at 11:56 AM by meat5000 for the following reason:

Problem is outdated. uJS is now Deprecated.

avatar image
0
Question by Lupus · Oct 26, 2015 at 09:46 AM · syntaxdifference

Is there any difference besides syntax between C#, javascript and mobo?

The differences between the languages is just syntax or there is any performance difference as well?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image fafase · Oct 26, 2015 at 11:46 AM 0
Share

I think some features about delegates are missing in US.

3 Replies

  • Sort: 
avatar image
1
Best Answer

Answer by steakpinball · Oct 26, 2015 at 01:21 PM

There are several features which exist only in C#.

  1. Delegates

  2. Lambda expressions

  3. Events

  4. Extension method shorthand

  5. Expression trees

C# also has a direct relation to the underlying .NET which it gets compiled to. UnityScript (Javascript) does not and, asa result, may be less efficient. You can use #pragma strict in UnityScript to bring it closer in performance to C#.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
2

Answer by Bunny83 · Oct 26, 2015 at 11:03 AM

Since all languages are compiled to the same intermediate language the resulting code runs equally fast. However in UnityScript (Unity's JavaScript variant) its way easier to write less efficient code with less lines of code as the compiler does a lot things behind the scenes.

A typical example is this:

 // Unityscript
 transform.position.x = 1;
 transform.position.y = 2;
 transform.position.z = 3;

This would be compiled as

 var temp1 = transform.position;
 temp1.x = 1;
 transform.position = temp1;
 
 var temp2 = transform.position;
 temp2.x = 2;
 transform.position = temp2;
 
 var temp3 = transform.position;
 temp3.x = 3;
 transform.position = temp3;

Since position is a property and Vector3 is a struct you can't directly change a component of the struct without a temp variable. Unityscript does this behind the scene, however for each component separately.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Developer1212 · Oct 26, 2015 at 11:56 AM

Js and C# are pretty much the same capability-wise but Js is WAY easier to learn.I personally prefer Js since it's easier to learn and has the same capability as C#. Mobo , however , doesn't support mobile development, in fact, the people who use mobo are almost no-one , you can't even use mobo (or boo) in 5.0 anymore. Forget about boo, Js and C# are both cool languages.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Lupus · Oct 26, 2015 at 12:59 PM 0
Share

I already know C# (I have started program$$anonymous$$g with C/C++ and I'm currently working with java), so that's what I use, but the few times I needed to use JS in my work, I find it much more difficulty to learn, it's also really easy to make mistakes due to the lack of types in variables, but that depends on each person opinion.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Difference between ternary Operator and If else 1 Answer

Unity JS Syntax Coloring for MonoDevelop 0 Answers

What does 'SetTexture[_]' mean in a shader? 1 Answer

Load gameoverscreen after condition. Error 1 Answer

Error in my script i don't understand. 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges