C# & architecture
Clean, flexible code keeps a project moving as it grows. This section covers design patterns, dependency injection, events, ScriptableObject architecture, state machines and async code in Unity. Aimed at developers who already have a prototype and feel it getting messy. 124 hand-picked Unity guides, tutorials, videos and repos, kept current.
- Unity Is Replacing Your Runtime. Are You Ready?
What Unity's move from Mono to CoreCLR changes in practice, including what may break builds or workflows.
youtube.com · Oct 2026 - High Performance Unity Game Development: using data-oriented design (Manning)
The book behind the data-oriented design approach: structure a Unity game around arrays of data and pure logic for high frame rates on limited hardware.
manning.com · ~Oct 2026 - The Real Reason Unity Is Finally Dropping Mono
Explains Unity's scripting backends, Mono versus IL2CPP, and why the CoreCLR move is coming.
youtube.com · Sep 2026 - Scriptable Objects Aren't Just Data Holders
Goes beyond data containers to show ScriptableObjects used for architecture, events and behavior in Unity.
youtube.com · Aug 2026 - Press vs Hold Interactions in Unity (With Conditions)
Build a scalable unity interaction system using interfaces. Learn to create flexible code for doors, chests, and terminals.
youtube.com · Aug 2026 - Data-oriented design: a Claude skill based on Nitzan Wilnai's book
A language-agnostic skill that applies the book's data/logic/memory rules to your own game code.
github.com · Jul 2026 - 10 More Extension Methods Every Unity Developer Needs
Writing clean code in Unity often requires repetitive boilerplate. This tutorial demonstrates 10 C# extension methods that reduce complexity in your scripts. Whether you are accessing components frequ
youtube.com · Jul 2026 - How to Manage Scenes in Unity Games
Covers how to structure, load and manage multiple scenes in a Unity game.
youtube.com · Jul 2026 - How I Coded the Perks in my Roguelike
How 150 roguelike perks were structured in code so modifiers stack and stay maintainable.
youtube.com · Jun 2026 - Unity Input System controls in Backyard Baseball 2026
Event-driven Input System setup for responsive, rebindable controls and local multiplayer.
unity.com · Jun 2026 - Managed jobs in Unity
Explains why Unity job structs must be unmanaged and how managed data can be handled in jobs.
blog.s-schoener.com · Jun 2026 - My Unity Singletons Are Finally Testable
Makes Unity singletons testable by replacing hard-wired access with swappable, injectable dependencies.
youtube.com · Jun 2026 - Unity Singletons Are an Anti-Pattern. Here's the Fix.
Explains why Unity singletons cause problems and shows a cleaner architectural replacement.
youtube.com · May 2026 - Architecting Albion Online: Building a PvP MMO to scale across platforms
Technical architecture letting a PvP MMO scale across PC, mobile and console.
unity.com · May 2026 - There's a Better Way to Organize Unity Game Actions
Implements the Command pattern in Unity for organizing game actions, with an undo system.
youtube.com · Apr 2026 - What I learned from improving Unity's Mono codegen, part 2
Covers the decision of whether to use LLVM when improving code generation for Unity games running on Mono.
blog.s-schoener.com · Apr 2026 - Unity DOTS State Machines - The Hot Path Show Ep. 58
The Hot Path Show is a weekly livestream focused on showcasing different ways to solve problems in game development through data-oriented design.
youtube.com · Apr 2026 - What I learned from improving Unity's Mono codegen, part 1
Walks through how code flows through Mono during JIT compilation and where its generated code falls short.
blog.s-schoener.com · Apr 2026 - You're Not Using C# Events To Their Full Potential
Shows advanced C# event techniques for decoupled Unity game code beyond basic events.
youtube.com · Apr 2026 - Scaling Unity Workflows for Medium To Large Projects
Keeping medium and large Unity projects maintainable with assembly definitions, automated tests and Git practices.
unity.com · Mar 2026 - The Observer Pattern Wasn't Enough. Here's What Comes Next.
Tackles coupling problems the Observer pattern leaves behind, such as components that must reference each other.
youtube.com · Mar 2026 - Why the Observer Pattern Isn't Enough
Demonstrates the limits of the Observer pattern in Unity and what problems remain.
youtube.com · Mar 2026 - Clean Unity Architecture Starts With a Mess
Builds a gem-collection feature the beginner way, then refactors toward clean, decoupled Unity architecture.
youtube.com · Mar 2026 - A Better Alternative to Singletons in Unity
Presents alternatives to singletons in Unity, such as service locators and dependency injection.
youtube.com · Mar 2026 - Data-Oriented Next Fest - The Hot Path Show Ep. 56
Last year I did a livestream with Nitzan Wilnai who is writing a book on data-oriented design in Unity. Nitzan's upcoming game: Cardwheel is in Steam Next Fest right now!
youtube.com · Feb 2026 - Unity Input System: Type Safety with Generated Code (Part 3)
Uses generated C# classes in the Unity Input System for type-safe input handling.
youtube.com · Feb 2026 - Unity Input System: Assets, Maps & Interactions (Part 2)
Covers Input System assets, action maps and interactions like hold and tap in Unity.
youtube.com · Feb 2026 - I Upgraded Unity to C# 14 - Here's What Changed
Walks through upgrading Unity to C# 14 and which language features actually change your code.
youtube.com · Jan 2026 - NuGet in Unity: The Definitive Guide
Explains how to use NuGet packages in Unity projects, with setup options and pitfalls.
youtube.com · Jan 2026 - Unity Metaprogramming: Reflection, Source Generators, IL Weaving
Compares Unity metaprogramming techniques: reflection, Roslyn source generators, IL weaving and Reflection.Emit.
youtube.com · Dec 2025 - Behavior Trees: how it works
Explains how Selectors, Sequences, and leaf nodes combine into modular hierarchical AI, with an interactive demo.
moonjump.com · Dec 2025 - @freya.bsky.social: many game quantities are better as rational numbers than flo
Time, UI sliders and line intersections can be exact fractions, avoiding float rounding issues.
bsky.app · Dec 2025 - Fun And "Magical" C# Features
Demonstrates obscure C# features like custom awaiters and undocumented keywords, and when they matter.
youtube.com · Dec 2025 - Top Useless C# Features (Part 1)
Shows rarely used C# features and explains when they are actually useful in game code.
youtube.com · Dec 2025 - Everyone's Wrong About For vs Foreach - I Ran The Benchmarks
Benchmarks for versus foreach loops in C# and Unity to see which is actually faster.
youtube.com · Nov 2025 - Finite State Machines: how it works
Learn how finite state machines drive enemy AI and how to build your own with states, transitions, and hierarchies.
moonjump.com · Nov 2025 - UniTask Best Practices - Better Async Code in Unity
Best practices for UniTask in Unity: cancellation, error handling and efficient asynchronous code.
youtube.com · Oct 2025 - Async Programming in Unity - What You NEED To Know
Explains async programming options in Unity: coroutines, async/await and UniTask, and when to use each.
youtube.com · Oct 2025 - Level Up Your Unity Game: Master Dependency Injection with VContainer!
Hands-on dependency injection in Unity using VContainer: registering, injecting and structuring game code.
youtube.com · Sep 2025 - Why Dependency Injection is a GAME CHANGER for Unity Games
Explains why dependency injection helps Unity games, using clear examples of decoupled code.
youtube.com · Sep 2025 - Inversion of Control in Unity == Your Secret Weapon
Explains inversion of control in Unity and how it makes code flexible and testable.
youtube.com · Sep 2025 - Taming Polymorphic Serialization
Handling complex inheritance hierarchies in Unity's serialization system. Learn how to serialize polymorphic types cleanly without losing data or breaking the Inspector.
bartouv.github.io · Sep 2025 - Create modular game architecture with ScriptableObjects
Using ScriptableObjects in Unity 6 for modular architecture, lower memory use and simpler code.
unity.com · Aug 2025 - Building a Flexible Combat System For Aether & Iron
Building a flexible combat system integrated with a branching narrative.
unity.com · Aug 2025 - Unity Events: Why Use Unity Events
Explains why to use UnityEvents.
youtube.com · May 2025 - Unity Events: Walk-Into Trigger
Uses UnityEvents for a walk-into trigger.
youtube.com · May 2025 - Breaking Down Feature Logic — Difficulty Picker in Unity
Breaks down feature logic by building a difficulty picker in Unity.
youtube.com · May 2025 - Learning to Break Down Game Features - Tip Calculator
Breaks game features into steps by building a tip calculator.
youtube.com · May 2025 - Getting Started with Variables
Beginner introduction to variables in Unity C#.
youtube.com · May 2025 - Mouse Events: Displaying a New Random Painting
Uses mouse events to display a new random painting.
youtube.com · Apr 2025 - Mouse Events: Initialize a Custom Painting
Uses mouse events to initialize a custom painting.
youtube.com · Apr 2025 - Mouse Events: Call a Function from Another Class
Calls a function from another class in response to mouse events.
youtube.com · Apr 2025 - Mouse Events: Create an Array of Prefabs
Creates an array of prefabs driven by mouse events.
youtube.com · Apr 2025 - Get Started with Mouse Clicks in Unity
Getting started with mouse clicks in Unity.
youtube.com · Apr 2025 - Access Unity's Hidden APIs With This Assembly Trick
Accesses Unity's internal APIs using an assembly definition reference trick.
youtube.com · Feb 2025 - C# Code Style Guide (Unity 6 edition)
C# style guide for Unity 6 teams: cleaner, scalable code and easier onboarding.
unity.com · Jan 2025 - Can you spare some cache? Live data-oriented design benchmarks
Self-contained HTML benchmark pages from his talk, showing how memory layout changes performance.
nitzanwilnai.github.io · ~Jan 2025 - Hierarchical AI state system from Bad North (thread)
Thread on Bad North's nested state hierarchy AI, its cache-miss costs and a source-generated alternative.
bsky.app · Nov 2024 - Level up your code with design patterns and SOLID E-book
Eleven programming patterns and SOLID principles in Unity, with a downloadable sample project.
unity.com · Jul 2024 - How to Program in Unity: Using my "BETTER" State Machine for Procedural Animation
Applies his state machine design to procedural animation.
youtube.com · Feb 2024 - How to build a Character Rig and State Machine for Procedural Animation | Unity Tutorial
Builds a character rig and a state machine that drives procedural animation.
youtube.com · Dec 2023 - Programming a BETTER state machine
A cleaner state machine design in C#, with the reasoning behind it.
youtube.com · Oct 2023 - Delegates and Events in Unity
Explains delegates and events in Unity C#.
youtube.com · Sep 2023 - 10x Performance with SIMD Vectorized Code in C#/.NET
Speeds up C# code with SIMD vectorisation; the ideas apply to Burst and Unity jobs.
xoofx.github.io · Jul 2023 - High Performance Collections in Unity C#
Shows how to use Unity's official object pool API in Unity 2021 for high-performance collections.
thegamedev.guru · Jul 2023 - Input Locks
Managing complex input state across multiple systems. A clean pattern for preventing input conflicts in cutscenes, dialogs, and overlapping game states.
bartouv.github.io · Feb 2023 - How to Program in Unity: Observer Pattern Explained
The Observer pattern in Unity: events and decoupling, explained simply.
youtube.com · Jan 2023 - Turning Events into Commands
Moving from loose event systems to structured command patterns. How to build maintainable, testable game architecture at scale.
bartouv.github.io · Jan 2023 - Warnings
Over 600 compiler warnings at startup? Learn how to use Pragmas and the csc.rsp file to take back control of your Unity console.
bartouv.github.io · Jan 2023 - Structure Based on Domains
Organizing Unity projects by business domains instead of technical layers. A scalable approach to project structure for growing teams.
bartouv.github.io · Jan 2023 - Seeded Random for Debugging
Making randomness reproducible for testing. Using seeded RNG to create deterministic gameplay that's easy to debug and test.
bartouv.github.io · Jan 2023 - GitHub - BorisTheBrave/sylves: C# Grid Library
Repo: Sylves, a C# grid library.
github.com · Nov 2022 - Level up your code with game programming patterns
Unity blog on applying game programming design patterns in Unity C# code.
blog.unity.com · Oct 2022 - C# Coding Conventions in Unity
Naming and layout conventions for readable Unity C# code.
youtube.com · Jul 2022 - Project Initialization - Unity Architecture
Preload scenes are the past man. Initialize your required assets easily using the RuntimeInitializeOnLoadMethod attribute. Prevent race conditions and dependency hell with this neat trick.
youtube.com · May 2022 - How to Program in Unity: Command Pattern Explained
The Command pattern in Unity: undo, replay and input handling.
youtube.com · Mar 2022 - The "KISS" Transaction Pattern
Uses a simple transaction pattern to protect sensitive code from sloppy programming.
thegamedev.guru · Nov 2021 - The "KISS" Command Pattern for Unity
Shows a simple command pattern for Unity that supports async gameplay logic.
thegamedev.guru · Nov 2021 - How to Program in Unity: Hierarchical State Machine Refactor [Built-In Character Controller #5]
Refactors a character controller into a hierarchical state machine.
youtube.com · Nov 2021 - The "KISS" Dependency Injection in Unity
Explains simple dependency injection principles for Unity projects.
thegamedev.guru · Nov 2021 - The Command pattern with Scriptable Objects
Implements the Command pattern with ScriptableObjects so commands become reusable assets.
bronsonzgeb.com · Sep 2021 - The Type Object pattern with Scriptable Objects
Uses ScriptableObjects as the Type Object pattern to define data-driven variants.
bronsonzgeb.com · Sep 2021 - The Scriptable Object Asset Registry Pattern
A ScriptableObject registry that finds and loads assets without scene references.
bronsonzgeb.com · Sep 2021 - How to Program in Unity: State Machines Explained
The state machine pattern explained for Unity beginners.
youtube.com · Aug 2021 - Game Programming: Time Slicing | Ming-Lun "Allen" Chou | 周明倫
Game programming tutorial on time slicing to spread work across frames.
allenchou.net · May 2021 - Game Programming: Delayed Result Gathering | Ming-Lun "Allen" Chou | 周明倫
Game programming tutorial on gathering delayed results of asynchronous work.
allenchou.net · May 2021 - Delegates, Lambda Expressions & Closures in C#
Explains delegates, lambdas and closures in C# for functional programming concepts.
alanzucconi.com · Mar 2021 - Throwing Exceptions as Expressions in Unity — The C# 7 Way
Shows how to throw exceptions as expressions using C# 7 features in Unity.
thegamedev.guru · Aug 2020 - An Introduction to Floating-Point Arithmetic - Alan Zucconi
Explains how floating-point numbers work in C# and the surprising bugs they can cause.
alanzucconi.com · Aug 2020 - Improving Floating-Point Precision in C#
Techniques for improving floating-point precision in C# for high-precision simulations.
alanzucconi.com · Aug 2020 - Unity C#: Expression-Bodied Members to Reduce Your Code Verbosity
Uses C# 7 expression-bodied members to write less verbose Unity code.
thegamedev.guru · Jul 2020 - Unity C#: Local Functions for Higher Safety (C# 7.0)
Shows how C# 7 local functions make Unity code safer.
thegamedev.guru · Jun 2020 - Unity C# 7.0: Reference Locals & Returns
Shows how C# 7 reference locals and returns simplify and speed up Unity code.
thegamedev.guru · May 2020 - Demystifying C# attributes for game development
Explains using C# attributes as an underused feature for game development.
gamasutra.com · May 2020 - Unity C# Pattern Matching: Make It Shorter (C# 7.0)
Uses C# 7 pattern matching to shorten repetitive conditionals and switches in Unity.
thegamedev.guru · May 2020 - Unity C# Discards: Make It Crystal Clear (C# 7.0)
Explains how C# 7 discards make Unity code clearer and simpler.
thegamedev.guru · May 2020 - Unity C#: Tuples — Improved (C# 7.0)
Explains the improved C# 7 tuples and how they raise productivity in Unity code.
thegamedev.guru · Mar 2020 - Unity C#: Out Parameters (C# 7.0)
Explains using C# 7 out parameters to return multiple values from Unity functions.
thegamedev.guru · Mar 2020 - Zero allocation code in C# and Unity - Seba's Lab
Article on writing zero-allocation C# code in Unity to avoid garbage collection.
sebaslab.com · Dec 2019 - Unity Tips | Part 3 - Interpolation
Unity tips on interpolation methods for blending between values smoothly.
danielilett.com · Sep 2019 - Unite Austin 2017 - Game Architecture with Scriptable Objects
Unite Austin 2017 talk on game architecture with ScriptableObjects.
youtube.com · ~Aug 2019 - Object Management: Shape Behavior
Object management tutorial adding modular behavior to shapes.
catlikecoding.com · Dec 2018 - Object Management: More Factories
Object management tutorial on composite shapes and multiple shape factories.
catlikecoding.com · Nov 2018 - GitHub - BorisTheBrave/DeBroglie: DeBroglie is a C# library implementing the Wave Function Collapse algorithm with support for additional non-local constraints, and other useful features.
Repo: DeBroglie, a C# Wave Function Collapse library with extra constraints.
github.com · Sep 2018 - Readable & Debuggable Multi-Condition Game Code
Coding patterns for writing readable, debuggable multi-condition game logic.
allenchou.net · Jul 2018 - Object Management: Reusing Objects
Object management tutorial on reusing objects via pooling.
catlikecoding.com · Jun 2018 - Object Management: Object Variety
Object management tutorial supporting multiple shapes, materials and colors.
catlikecoding.com · May 2018 - Porting the Unity Engine to .NET CoreCLR
An experiment running the Unity engine on CoreCLR, with what worked and what broke.
xoofx.github.io · Apr 2018 - A Better Architecture for Unity Games
Shares lessons on structuring a Unity game architecture from a Diamond Dash remake.
thegamedev.guru · Apr 2018 - Timeslicing Batched Algorithms in Games
Spreads batched algorithms across multiple frames with timeslicing.
allenchou.net · Mar 2017 - Iterators in C#: yield, IEnumerable & IEnumerator
Guide to C# iterators with yield, IEnumerable and IEnumerator.
alanzucconi.com · Jan 2017 - Extension methods in C#
Extends Unity classes using C# extension methods.
alanzucconi.com · Aug 2015 - Enum, Flags and bitwise operators
Explains C# enums, flags and bitwise operators.
alanzucconi.com · Jul 2015 - Implementation of Hex Grids (with Unity/C# code)
Copy-ready hex grid code in C# and other languages, covering storage, maps and rendering.
redblobgames.com · May 2015 - Scope-Based Resource Management (RAII)
Explains scope-based resource management (RAII) in game code.
allenchou.net · Oct 2014 - Implementation of A*
Python, C++ and C# implementations of A* with priority queues and path reconstruction.
redblobgames.com · May 2014 - Intrusively Linked Lists with Safe Link Destruction
Intrusive linked lists with safe link destruction.
allenchou.net · Jul 2013 - Memory Management part 3 of 3: STL-Compatible Allocators
Memory management part three: STL-compatible allocators.
allenchou.net · May 2013 - Memory Management part 2 of 3: C-Style Interface
Memory management part two: a C-style interface for the allocator.
allenchou.net · May 2013 - Memory Management part 1 of 3: The Allocator
Memory management part one: building an allocator.
allenchou.net · May 2013
Showing the newest 120 of 124. See all 124.