# Habrador/Unity-Programming-Patterns

Implementations of programming design patterns in Unity with examples in C# when to use them.

Repository: https://github.com/Habrador/Unity-Programming-Patterns
Canonical: https://ross.abutalabs.com/products/unity-programming-patterns
Homepage: https://www.habrador.com/tutorials/programming-patterns/
Language: C#
License: MIT
License Family: permissive
Topics: design-patterns, observer-pattern, state-pattern, unity, unity3d, prototype-pattern, flyweight-pattern, type-object-pattern, subclass-sandbox-pattern, object-pool, object-pool-pattern, spatial-partitioning, game-programming-pattern, command-pattern, singleton-pattern, factory-pattern, architecture, computer-science, principles, software-engineering
Last push: 2026-04-28T12:37:06+00:00

## Health v2 (maintenance only)
Score: 68/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 79, release rhythm 35, longevity 100
- inputs: {"age_days": 2271, "days_push": 127, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2092, forks 271 (observed 2026-08-28T04:06:12.531994+00:00)

## What it is
A collection of complete C# implementations of programming design patterns for Unity, largely based on the book Game Programming Patterns. Each pattern includes explanatory text and runnable example code demonstrating when and how to use it.

## Use cases
- learn design patterns in unity with c# examples
- implement observer pattern in unity
- understand object pooling for game objects
- see how the command pattern enables undo and replay
- organize a growing unity codebase with architectural patterns
- study game programming patterns from the book in c# instead of c++

## When to choose
- you are a Unity developer wanting practical, runnable C# examples of design patterns
- you want to learn patterns from Game Programming Patterns adapted to Unity
- you need guidance on structuring a growing Unity game project

## When to avoid
- you need a production-ready pattern library to drop into your project
- you work outside Unity or in a language other than C#
- you want exhaustive coverage of all design patterns

## Facets
- artifact type: learning-resource
- maturity: active
- function: developer-tools, documentation
- domain: tutorials, programming-languages
- platform: game-engine, cross-platform
- tags: design-patterns, unity, csharp, game-programming-patterns, educational, example-code, game-development

## Member repositories
- Habrador/Unity-Programming-Patterns (main) score 68

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:12.531994+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:55:29.515556+00:00, confidence not recorded.
  - readme: https://github.com/Habrador/Unity-Programming-Patterns (fetched 2026-08-28T04:06:12.531994+00:00, sha 52d665fdd030)
  - homepage: https://www.habrador.com/tutorials/programming-patterns/ (fetched 2026-08-29T10:35:10.486280+00:00, sha f5838c6582f5)
  - site_page: https://www.habrador.com/about (fetched 2026-08-29T10:35:10.495717+00:00, sha 1157a8f60fb4)
- Data as of 2026-08-30T08:39:29.467469+00:00.
