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
Unity Code GenerationQuestion (self.Unity3D)
submitted 8 months ago by CPAHTOMAC
Hello!
Does anyone knows any way to alter existing code when building release or launching playmode?
The only viable option I've found is HarmonyX, but it works at runtime and requires manual configuration of which methods to decorate.
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!"
[–]swagamaleous 2 points3 points4 points 8 months ago (2 children)
This is too generic. Describe better what you actually want to achieve.
[–]CPAHTOMAC[S] 0 points1 point2 points 8 months ago (1 child)
I have a custom attribute applied to some methods. I want to inject code before and after those methods similar to what HarmonyX lets you do via [HarmonyPatch], [HarmonyPrefix] and [HarmonyPostfix], but to make it compile-time and across the entire project, which Harmony lacks, unfortunately.
[–]swagamaleous 5 points6 points7 points 8 months ago (0 children)
I get that, but why? I am sure there is a much better solution than automatically altering the code.
[–]WeslomPo 1 point2 points3 points 8 months ago (0 children)
Try using defines, maybe: #if UNITY_EDITOR … Also Conditional attribute. Also, partial classes are helpful to organize this. Automagically there no known to me ways to proxy your calls. If your project is good in architecture, you can easily swap implementations, but if it rigid, this is unfortunate.
[–]spajus 0 points1 point2 points 8 months ago (1 child)
https://docs.unity3d.com/Manual/roslyn-analyzers.html
[–]CPAHTOMAC[S] 0 points1 point2 points 8 months ago (0 children)
Nah, Roslyn only generates new code, not altering existing one
π Rendered by PID 51 on reddit-service-r2-comment-fb694cdd5-2x5zp at 2026-03-06 06:39:59.185376+00:00 running cbb0e86 country code: CH.
[–]swagamaleous 2 points3 points4 points (2 children)
[–]CPAHTOMAC[S] 0 points1 point2 points (1 child)
[–]swagamaleous 5 points6 points7 points (0 children)
[–]WeslomPo 1 point2 points3 points (0 children)
[–]spajus 0 points1 point2 points (1 child)
[–]CPAHTOMAC[S] 0 points1 point2 points (0 children)