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 /
  • Help Room /
avatar image
0
Question by Epster · Mar 28, 2017 at 08:23 PM · c#javatranslationjava to c#

How to change from C# to JAVA?

I am working on a project for school in which we can do anything we want, in whatever language or so i thought. I decided to make a game in which you roll a marble around a map and interact with other players (only 4 players) until some player reaches an end goal. The problem is that my teacher now says i cant use C# so i will need to change it to JAVA, the problem with that is that i do not want to translate it by hand because honestly i am to lazy because it would take forever. So i need to know if i can bridge the code from C# to JAVA and how? Thank you

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
1

Answer by Dave-Carlile · Mar 28, 2017 at 08:25 PM

You can't use Java because Unity doesn't support Java. Do you mean Javascript? Technically Unity doesn't support that either, but a similar language called UnityScript.

The syntax differences are fairly small and shouldn't take too long to convert by hand. I would ask the teacher why? UnityScript isn't supported much in Unity anymore. C# is most definitely the way to go.

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 tanoshimi · Mar 28, 2017 at 09:10 PM 1
Share

If this is a school computing project, I very much doubt that "Unity Javascript" is a permissible language but C# is not ;) It seems much more likely that the OP really has to use Java, in which case Unity is out.

avatar image
1

Answer by Joe-Censored · Mar 28, 2017 at 09:21 PM

Unity doesn't support Java, so can't be done in Unity. Did you mean JavaScript? JavaScript and Java are two entirely different languages.

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 FlyingHighUp · Mar 28, 2017 at 09:18 PM

Converting C# to Java is simple enough. Just copy and paste, replace properties with Get and Set, get rid of usings and replace them with imports.

...But chances are most of your code is useless without the Unity API (Vector3, Monobehaviour etc.) . Talk to your teacher and try to work something out. Otherwise RIP Op. May god have mercy on your soul.

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 LiloE · Mar 30, 2017 at 06:45 PM 1
Share

Lolz! Amen.

avatar image
0

Answer by Epster · Mar 30, 2017 at 05:33 PM

Thanks does anyone know if i can convert to python then?

Comment
Add comment · Show 2 · 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 Joe-Censored · Mar 30, 2017 at 06:57 PM 0
Share

Unity supports JS and C#.... not Python, not Java, not Perl, not C++, not VB..... JS and C# are your choices.

avatar image FlyingHighUp Joe-Censored · Jul 24, 2017 at 10:48 PM 0
Share

Actually, I think Unity secretly still supports Boo, - or at least a subset suitable enough for a simple game.

It has virtually the same Syntax as Python, so maybe for future reference.

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

11 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 avatar image

Related Questions

Convert Java to C# 1 Answer

Issues with c# script, minor error that I am unsure how to fix 1 Answer

Java to C# Translation 1 Answer

JavaScript to C# 1 Answer

NPC Wandering Intervals/Gaps Help! 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