Cracking Open R.E.P.O.'s Source: Rep0S2cLeak
Rep0S2cLeak is a C# source snapshot of the multiplayer horror game R.E.P.O. I decompiled Assembly-CSharp.dll, exported all the scripts, and saved the whole thing as a read-only code archive of 850-plus files.
Up front: this is not a runnable Unity project. No engine, no assets, no scenes. The HintPath entries in the .csproj point at the Managed DLLs from my local Steam install, and the repo doesn’t ship those. The point is to look at the architecture, the naming, and how the modules are split apart, plus do a bit of static analysis along the way.
The enemy system is the centerpiece. EnemyDirector orchestrates everything from the top, EnemyParent and EnemyRigidbody handle entities and physics, and each enemy carries its own EnemyState* state machine, with EnemyHunter, EnemyShadow, EnemyGnome, and EnemyBang hanging off underneath. Follow the state machines and you can basically reverse out the behavior of every monster.
The main flow runs through GameDirector. Its state enum lines up from Load / Start / Main all the way to Outro / End / Death, which makes the lifecycle of a single match clear. GameManager also hides Steam seasonal event detection, and levels get generated by LevelGenerator plus a pile of Map* pieces.
The audio side exceeded expectations. Audial/ and Audial.Utils/ are a whole homegrown sound-effect processing suite: compression, distortion, reverb, flanging, plus filters, envelopes, and LFOs, effectively a small DSP library crammed into the game. The voice side goes even harder, running both Overtone and Klattersynth, two TTS runtimes, to synthesize voices in real time.
As for the rest, networking uses Photon PUN2 for multiplayer sync plus voice, and UI/debugging has the ChatManager, DebugConsoleUI crowd. The stack is C# 12, .NET Standard 2.1, the full Unity family, plus Steamworks and the Discord SDK. If you want to dig through it yourself, go in through GameManager.cs, GameDirector.cs, and EnemyDirector.cs, then crawl outward along the state machines. If you want it to compile, you’ll have to supply the DLLs yourself and fix up HintPath. GPLv3.