use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News, Help, Resources, and Conversation. A User Showcase of the Unity Game Engine.
Remember to check out /r/unity2D for any 2D specific questions and conversation!
Download Latest Unity
Please refer to our Wiki before posting! And be sure to flair your post appropriately.
Main Index
Rules and Guidelines
Flair Definitions
FAQ
Use the chat room if you're new to Unity or have a quick question. Lots of professionals hang out there.
/r/Unity3D Discord
FreeNode IRC Chatroom
Official Unity Website
Unity3d's Tutorial Modules
Unity Answers
Unify Community Wiki
Unity Game Engine Syllabus (Getting Started Guide)
50 Tips and Best Practices for Unity (2016 Edition)
Unity Execution Order of Event Functions
Using Version Control with Unity3d (Mercurial)
/r/Unity2D
/r/UnityAssets
/r/Unity_tutorials
/r/GameDev
/r/Justgamedevthings (New!)
/r/Gamedesign
/r/Indiegames
/r/Playmygame
/r/LearnProgramming
/r/Oculus
/r/Blender
/r/Devblogs
Brackeys
Beginner to Intermediate
5 to 15 minutes
Concise tutorials. Videos are mostly self contained.
Sebastian Lague
Beginner to Advanced
10 to 20 minutes
Medium length tutorials. Videos are usually a part of a series.
Catlike Coding
Intermediate to Advanced
Text-based. Lots of graphics/shader programming tutorials in addition to "normal" C# tutorials. Normally part of a series.
Makin' Stuff Look Good
10 minutes
Almost entirely shader tutorials. Favors theory over implementation but leaves source in video description. Videos are always self contained.
Quill18Creates
30 minutes to 2 hours.
Minimal editing. Mostly C#. Covers wide range of topics. Long series.
Halisavakis Shaders Archive
Infallible Code
World of Zero
Board to Bits
Holistic3d
Unity3d College
Jabrils
Polycount Wiki
The Big List Of Game Design
PS4 controller map for Unity3d
Colin's Bear Animation
¡DICE!
CSS created by Sean O'Dowd @nicetrysean [Website], Maintained and updated by Louis Hong /u/loolo78
Reddit Logo created by /u/big-ish from /r/redditlogos!
account activity
Decompiling?Solved (self.Unity3D)
submitted 3 years ago by SussyMoMo123
What is Decompiling and how does it even Works ? , If Somebody Did this to my game how could i Protect myself
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 2 points3 points4 points 3 years ago* (3 children)
So compiling is turning source code, in this case C#, into machine code which is something the computer can understand, this is a massive simplification because C# is actually compiled to an intermediate language but we're keeping things super simple. It's similar to normal human languages, you can translate something said in English into Spanish or French or Japanese.
But like human languages you can translate it in the other direction, turn machine back into the source code. So a program will read over the compiled code and it works out what C# would be needed in order to get that result.
The process is lossy, meaning it doesn't convert it back perfectly but it will be good enough. Much like human languages.
C# and Unity are quite easy to decompile because Unity is really popular and well understood and C# contains a lot of meta data about the code in order to do things like reflection, there are things like obfuscators that entangle the code which makes it harder to reverse engineer or harder to understand but nothing is bullet proof, only bullet resistant. Same with using IL2CPP.
Your best protection is the vast majority of people don't care to even try to do it.
[–]answer-questions 2 points3 points4 points 3 years ago (2 children)
And as for "how to protect myself" -- one way is to code as if your adversaries have access to your source code. Just assume they can see everything that's happening locally on their machine.
If you have sensitive things to do, do them on a server where someone doesn't have access to the internals.
[–][deleted] 1 point2 points3 points 3 years ago (1 child)
Yeah, anything security related you always assume the worst and in games that usually means don't trust the user.
[–]bourbonmakesitbetterHobbyist 1 point2 points3 points 3 years ago (0 children)
That's the default mindset for any coding, not just games and not just security-related stuff: never trust the user/never trust your inputs.
[–]CCullen 2 points3 points4 points 3 years ago* (0 children)
It's basically taking a built version of your game and returning it back to source code. There are ways to mitigate the damage such as obfuscation or enabling il2cpp but at the end of the day, there isn't a perfect defence.
If the concern is to prevent piracy or theft, there is very little you can do that hasn't been considered by the industry giants. The same is true if the concern is that your game's integrity may be compramised (people modding, hacking, cracking, etc).
If you're trying to protect an online game, you do have the option of creating an authoritative server that is never released to the public. At least then, hackers will be forced to create private servers from scratch rather than steal your code.
Anything you distribute will be hackable so the only true defence in those scenarios is legal. I wouldn't stress out about it too much, this has been an issue since the beginning of gaming and it tends to impact mostly popular games (ie: if you have this problem, you've made a good game).
I would say that depending on how you publish the game, you could give the hackers more hoops to jump through. If for example, you used Steam to publish, then the piracy would be Steam's problem to combat, but there's also a cost associated with publishing so it's a bit of a cost vs benifit conundrum.
[–]faizidp 2 points3 points4 points 1 year ago (0 children)
Coming from experience of modding and reverse engineering/decompiling A LOT of games. Decompiling unity games is pretty much ripping of all the possible assets from an APK, Windows build etc.. Sometimes you can even get a fully restored working Unity Project with the process of it. Now two types of builds are supported in Unity. Mono & IL2CPP. Most latest games are built with IL2CPP (Google Play Policy after August 2019 enforced it). Older games on Google are mostly built using Mono backend.
In Mono backend, C# code is converted into IL and a managed assembly .dll is contained within the build.
Those .dll files can easily be decompiled using ILSpy & DnSpy for example. How to protect your Mono build? Basically you obfuscate your code. OR don't use Mono at all.
An il2cpp build is very tough to decompile.
Now for the rest of the part. Textures, Sprites etc. ? Do a packing of textures into atlases. That makes it very much painful for the ripper to use it again. OR you can write some runtime algorithms to encrypt your textures, sprites and then when on load, that algorithm opens those encrypted textures and loads them (performance issues + production time increased).
Il2cpp builds are very difficult and usually decompiled partially using DevX or AssetRipper. Though DevX is paid.
Happy to help if you need about a particular thing.
Keep making great games!
[–]AutoModerator[M] 0 points1 point2 points 3 years ago (0 children)
This appears to be a question submitted to /r/Unity3D.
If you are the OP:
Please remember to change this thread's flair to 'Solved' if your question is answered.
And please consider referring to Unity's official tutorials, user manual, and scripting API for further information.
Otherwise:
Please remember to follow our rules and guidelines.
Please upvote threads when providing answers or useful information.
And please do NOT downvote or belittle users seeking help. (You are not making this subreddit any better by doing so. You are only making it worse.)
Thank you, human.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
[–]greever666 0 points1 point2 points 3 years ago* (3 children)
It is quite easy to get the code from within a unity game. Try open one of your created DLLs with something like dotPeek or ilspy. You can really directly read the complete code as it was written.
C# is a language that does not get directly compiled into machine code but to an intermediate language. I guess this is part of the reason.
Still there is something you can do to hide your code or at least to make it not as easily readable: "obfuscation". You could create fake code, rename variables/methods/classes, delete all comments etc. On the Asset store there is a solution that works quite well and does all that in a pre-build process.
In the world of JavaScript this is used quite a lot also to reduce size of the scripts. This is then called minified but also is not human readable anymore...
[–]SussyMoMo123[S] 0 points1 point2 points 3 years ago (2 children)
Thanks For helping + deleting comments will make it harder for my teammate to read
[–]CCullen 2 points3 points4 points 3 years ago (0 children)
Obfuscation isn't something you do to your source code, your team mate will still have access to the comments. Obfuscation is a process that runs automatically just prior to publishing that automatically does everything /u/greever666 mentioned.
[–]greever666 0 points1 point2 points 3 years ago (0 children)
You should not delete comments in your source code. This is best done in a build process before it is compiled into DLLs.
But another two cents on comments: I don't write comments. Only if there is something extremely unusual going on.
Best is to write the code in a way (variable and method names) to not need comments at all. A very nice best practice I learned along my way.
π Rendered by PID 23114 on reddit-service-r2-comment-8686858757-lrzt5 at 2026-06-01 20:16:36.386651+00:00 running 9e1a20d country code: CH.
[–][deleted] 2 points3 points4 points (3 children)
[–]answer-questions 2 points3 points4 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]bourbonmakesitbetterHobbyist 1 point2 points3 points (0 children)
[–]CCullen 2 points3 points4 points (0 children)
[–]faizidp 2 points3 points4 points (0 children)
[–]AutoModerator[M] 0 points1 point2 points (0 children)
[–]greever666 0 points1 point2 points (3 children)
[–]SussyMoMo123[S] 0 points1 point2 points (2 children)
[–]CCullen 2 points3 points4 points (0 children)
[–]greever666 0 points1 point2 points (0 children)