Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
RanBowJet

C# to .JS (Javascripts/unityscripts) convert - Unity help

Question

Hey ArmedUnity community, 
I worked on a Unity project for a long time and I have write the most script's in javacodes so JS (Javascripts/unityscripts), but now I made a mistake.
I would convert one Javascript Unity project to C# scripts with a script converter tool, but the converter has convert all my javascripts in my primary Unity Project to C# scripts too. 
Now I don't have a backup from my primary project Javascripts, so all my javascripts are converted to C# scripts (my game project don't work anymore). 
But I have build my game a day ago, so I have now downloaded "dotPeek" the tool can decompile .dll files and can export scripts. The problem is, it can only decompile all scripts to C# not to javascripts. I have only two scripts written in the c# language, the rest is written in JS, so JavaScript/unityscript.

 

Now, I need your help:


 - My question is, is there a way to convert all the C# scripts back to my javascripts?


 - Or the better option: Is there a way to extract the js (Javascripts/unityscripts) from my builded game?


Here are a picture from the two c# scripts in my builded game(I can export my c# scripts perfect with "DotPeek" or any export tool, but not my javascripts):

Please login or register to see this link.



And here are a picture from my Js (Javascripts/unityscripts). If I open my builded game with any decompile tool, will any program convert my javascripts to c# scripts automatically. So this picture is made in "DotPeek" too:

Please login or register to see this link.


Thanks,
-ImHaxoTV aka Florian

Edited by ImHaxoTV

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts


  • 0

By mistake I've converted my javascripts/unityscripts to C# scripts (I don't have a backup from my Javascripts), but I have build my game a day ago.

So now I use the decompiler to extract my javascripts to get my project source working. The problem is, if I open my builded game with any decompile tool, will any program convert my javascripts to c# scripts automatically(So I can't export my javascripts from my builded game).

 

And my question is: Is there a way to extract the js (Javascripts/unityscripts) from my builded game?

Edited by ImHaxoTV

Share this post


Link to post
Share on other sites
  • 0

If it was built in c#, it will remain in c#. So there is no point in trying to build it and then decompile it. What janky converter did you use that straight up deleted the original js files? When you convert, it creates a new file, names it and copy/converts to the new file, not replace the original js.

 

edit: honestly it sounds like your trying to pirate a plugin and convert it into a language you understand, not trying to convert your own code. The reason I believe that is bc building and decompiling it makes 0 sense if you have the source already (c# files to convert to js) and there's just too many "coincidences" (accidentally converted an entire project to a language you don't know to being with, accidentally losing all the js files (originals) and wanting to build it and then decompile it). Can you not just look at the c# file and convert it by hand... since it is "your" code in the first place?

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

Hey, first I understand c# and .JS perfect. I have created many famous modifications for GTA IV and GTA 5  etc, like the first ps4 mod menu or the XMC 6.0.

And yeah, strictly speaking my buddy has decompiled the codes from his old "Unity 4"game to open it in Unity 2017. He is one of the creators from "PokeGen" and now he has decompiled the javascripts to c# scripts(.....). Now, we need a tool to decompile the "Assembly-UnityScript.dll", there are the .JS (JavaScripts/UnityScripts). A tool could simply extract them as javascript, but Unity need to publish the JavaScript source code. As far as I know, there is no other solution.

 

Pictures from the "PokeGen" project in Unity 2017:

Poke_Gen_Sceen.png

 

Poke_Genscreennidorino.png

Share this post


Link to post
Share on other sites
  • 0

@ImHaxoTV ok.... ? I made some fairly famous mods for grand theft auto (original gta) back when you had to download it on a 56k modem and road on the fence of becoming "illegal" back in the 90's. You can find my name in games, movies and music spanning the last 2 decades. This year marks my 23rd year of video game programming which is more years the average persons age on this forum, but that doesn't even remotely answer the question. The question had nothing to do with your past.

 

the question is, by me and others, what does decompiling a build have anything to do with converting your own source code? If you have the source in c# already, why do you need to decompile a build just to convert it to js? If you the c# file, any c# to js converter will work without decompiling 

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

Hello, you have written "any c# to js converter will work without decompiling ". Can you tell me the name or how can I find a c# to .js converter?

Because I can't find one

Share this post


Link to post
Share on other sites
  • 0

So if you type in google "c# to unityscipt converter" you come up with no results? There's even one that let's you try it for free without buying it that converts 100 lines at a time. You can try it out, if it works well then you can purchase the plugin

 

converters just read it like a text file and translates it to a different format. so if it reads "int myVar = 1;" then it outputs "var myVar : int = 1;" to the new file instead. Pretty basic stuff. There thousands of converters out there for any language you can think of.

 

p.s. Now software that converts while it decompiles (what you were asking for to begin with) is pirating software which we don't condone or associate with on this forum because most of us had/have software being pirated from us so links to those aren't tolerated here. In the end, the only reason any "normal" person would ever want/need a decompiler for is thievery

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

Ok thanks for your help, my german browser has blocked this search results.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...