Search Unity

Converting C# into Unity Script

Discussion in 'Scripting' started by nxtvignesh007, Mar 30, 2015.

  1. nxtvignesh007

    nxtvignesh007

    Joined:
    Feb 15, 2015
    Posts:
    4
    Hello i was building a simple game in unity using c#,and i am trying to finish it as soon as possible.

    I wanted to add more levels,build a simple menu etc,but i couldn't find any useful tutorials.
    And finally i got some great tutorials in JavaScript.Now the problem i am having is how to convert the JS file into C# file and is it ok to combine to languages in one project?

    I am writing JS file just to switch between the scenes.What should i do?
     
  2. nxtvignesh007

    nxtvignesh007

    Joined:
    Feb 15, 2015
    Posts:
    4
    Sorry the question should be converting my JavaScript/UnityScript File into C#
     
  3. Bankler

    Bankler

    Joined:
    Apr 10, 2012
    Posts:
    66
    You can have different languages in different scripts. It's not really good practice, but for a simple test game, there's really nothing wrong with it. (Unless you need the scripts to interact, in case you'll start running into problems)

    As for the question of converting script files. If you have an ambition to learn more about coding, it sounds like a good and reasonable challenge to convert some javascript files to C# manually. It ain't gonna be super easy if don't know much about coding, but with some stubborness and some googlefu, you'll get there, and you'll learn a lot by doing it.