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 /
avatar image
0
Question by Dryden Richardson · Jul 20, 2011 at 04:26 PM · c#javascriptjs-c#-together

Using C# and Javascript in a project

Hi, I'm wondering if Javascript is a good langauge to use on a project, especially a Multiplayer project, would it be as good as C# and good to use, having a game coded entirely in Javascript, or would it perform worse than a game coded in C#?

I'm also wondering if you can mix C# and Javascript Together in a project or a gameobject without any problems. Could there be problems if you had a Character Controller and you used C# for the Camera and Javascript for the motor, or would it not work at all?

And for the project, if you had your server or your Multiplayer features coded in Javascript and then you change the language to C# for different parts of the game such as gameobjects, weapons and AI (Performance-Wise).

I'm new to scripting so I'm not entirelly clear on how things work yet. Thanks for reading!

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 Dryden Richardson · Jul 20, 2011 at 04:36 PM 0
Share

Sorry I mean UnityScipt

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by testure · Jul 20, 2011 at 04:41 PM

what's the point of mixing two languages anyway? Just pick one and use it...

That said, you can mix as many scripting languages in unity as you want. I'd imagine that it would be a huge pain to manage though.

One scripting language isn't necessarily better than another... it all gets compiled down to JIT anyway. UnityScript does lack things like generics, and other abstract concepts of OOP, but chances are if you're asking this question, you probably don't need those things.

in the end- performance wise, they will all perform the same.

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 SilverTabby · Jul 20, 2011 at 07:06 PM 2
Share

You can mix and match languages all you want.

For example, the Vector3 class is internally written in C#, but people use it in javascript, C#, and boo all the time with no problems.

The only thing you have to worry about is if everything compiles in the correct order.

http://unity3d.com/support/documentation/ScriptReference/index.Script_compilation_28Advanced29.html

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Distribute terrain in zones 3 Answers

Multiple Cars not working 1 Answer

this script in Javascript?? 0 Answers

Problem Javascript to C# 3 Answers

Javascript equivalent of an inspector C# public List? 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