Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
avatar image
1
Question by monkeyThunk · Mar 13, 2012 at 04:16 PM · javascriptprogramminglanguage

Is UnityScript the same as JScript?

Unity uses keywords like "extends" and "super" and "class". I see that these are part of JScript, and are very different than EcmaScript's "prototype".

Is Unity Javascript actually JScript, can I use the MSDN JScript reference?

Comment
Add comment
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

4 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Bunny83 · Mar 13, 2012 at 04:28 PM

No. UnityScript is a .NET language with a Javascript-like syntax. UnityScript implements nearly all features of .NET or Mono and therefore classes uses inheritance instead of prototyping.

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
1

Answer by CC Inc · Mar 13, 2012 at 06:09 PM

See this site:

http://unifycommunity.com/wiki/index.php?title=UnityScript_versus_JavaScript

Comment
Add comment · Show 4 · 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 Eric5h5 · Mar 13, 2012 at 09:15 PM 1
Share

The question is about JScript, not Javascript.

avatar image Bunny83 · Mar 14, 2012 at 10:06 PM 1
Share

To quote a quote from wikipedia:

A lot of people think that JScript and JavaScript are different but similar languages. That's not the case. They are just different names for the same language, and the reason the names are different was to get around trademark issues

The big problem with the language "Javascript" is that there's not one Javascript. The actual standard is EC$$anonymous$$AScript but nearly all implementations are just javascript-like languages. $$anonymous$$icrosoft's JScript has some modifications and extentions that other Javascript implementations doesn't support, but there's no real standard besides EC$$anonymous$$A as far as i know.

avatar image Eric5h5 · Mar 14, 2012 at 10:35 PM 0
Share

JScript and JScript.NET are quite different.

avatar image syclamoth · Mar 15, 2012 at 12:23 AM 0
Share

See, this kind of confusion is why I just code in C#.

avatar image
1

Answer by rutter · Mar 13, 2012 at 04:31 PM

I've heard people compare the two, but I don't think they're close enough that you'll be able to use documentation as if they're identical.

The Unify Community Wiki has some pages, UnityScript versus JavaScript and Head First into Unity with UnityScript, which might be helpful.

There are some threads on the Unity forums about this topic, but I haven't seen any that seem to be especially authoritative.

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
1

Answer by Eric5h5 · Mar 13, 2012 at 04:46 PM

Unityscript is very similar to JScript.NET (not JScript), and most if not all JScript.NET code would work identically in Unity. Using the JScript.NET reference is much more useful than Javascript, although keep in mind there are things in Unityscript that JScript.NET doesn't have, such as generics.

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 ina · Nov 12, 2012 at 11:49 AM 0
Share

can you give some examples of JScript.Net code that won't work in unity?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

10 People are following this question.

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

Related Questions

Multiple Cars not working 1 Answer

What should i learn for unity C# or UnityScript? 4 Answers

General purpose questions for Unity PRO 2 Answers

Create an array of classes, of different type. 1 Answer

Need a simple car physics script working on unity 5? 1 Answer


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