- Home /
Is there a way to reverse engineer a built project.
Me and a team of 5 have been working on an app game for about 2 months but out of no where our coder up and disappeared, its been close to like 5 months now and what we can manage on our own is no comparison to what he could do. Is there a way that we could run those files on the project editor and continue work from a build game file and data or are we just screwed
You won't be able to recover the source code from a built release version of a project.
You had no source control management? No Backups? No access to the unity project? And if you had access to the unity project, why isn't the source code there?
we sent him all the objects and art to work into it and he'd send us built versions for consulting and one day just stopped talking to us, thanks for all the comments but we've just moved on.
The source could should be available unless he stripped everything and took it with him. Otherwise the ONLY way to reverse engineer anything is to look at the machine code and rebuild the code by translating that. This is an extremely high level topic that people will get paid a hole bunch of $ to do. So unless you can get your hands on that original source code.....yes your screwed.
There is a reason why you cant do this, you know... for hacking and reselling a game etc
Answer by nullgobz · Jul 31, 2015 at 12:28 AM
Well there is one way to acually get the sourcecode but its not pretty. You could decompile the game dll file.
Look in your game folder: [gamename]_Data/Managed/
For these dlls:
Assembly-CSharp.dll -> for c# scripts Assembly-UnityScript -> for js scripts
Open that file/files with a decomilation software like: dotPeek.
If you use dotPeek, select the dll, namespace or "root namespace" right click a class and "decompile source"
Also use source control in the future if you care about your project :) Best of luck!
Yeah, it kinda sucks when a programmer ups and dissapears. :/
I have no idea if you'll see this or not, but I made an account simply so that I could thank you for your help. It is 3:30 A$$anonymous$$ where I live, and I have been trying to recover one of my files since my visual studio glitched and (irreversably) deleted my code. I've been on forums, watching YouTube videos, and searching through dozens of links trying to find a solution. I was not able to recover my most recent file, but I did have an .exe from a build about two weeks ago. I spent the last three hours trying to recover the file in there (a file which houses the vast majority of my code and whose absence broke my game entirely) using ILSpy, but I'm very new to program$$anonymous$$g/Unity (this is actually my first Unity project), so I couldn't understand most of the tutorials /answers on forums that I could find, as they were written for more experienced developers that new the filing system and contents better than me. Everyone told me to open the .exe file, but I repeatedly received errors. I tried everything I could think of and was on the absolute brink of quitting entirely (closing my many open tabs in defeat) when I searched ONE $$anonymous$$ORE TI$$anonymous$$E and found your answer.
So, thank you SO much for your easy-to-understand help. If it weren't for this answer, I would have had to revert back to a version of the file from nearly two months ago (right after I started the project), and I would have lost almost ALL of my progress for my game that is due this week for finals.
If this is a webplayer build (from 7 years ago), how can we still do this?
Answer by Bunny83 · Jul 31, 2015 at 12:40 AM
The script source code uaually can be restored without much problems except it has been manually obfuscated. A Unity build doesn't compile to machine code as we use Mono. All your scripts are compiled to CIL code (common intermediate language). The best decompiler i know is ILSpy. It can view the classes in IL and can also decompile to C# or VB.NET.
Asset files can partially be restored but you never get back to the original files.
It also depends what kind of "build" you have. In standalong builds you can access the assemblies directly. An android apk file is actually just a zip file. So you can open it with most zip tools and extract the dlls. There are even solutions to "unpack" a webplayer build.
what if it has been built with IL2CPP for android, is there a way to restore the scripts. I tried decompiling the .dll but it only gives me the files.cs names and the functions names without any code
I have a webplayer build from 7 years ago and I lost the source code, how can I unpack it to get back my original codes so I can build it for the new html5?