Design Patterns applied to Unity3D and C#
Alternatives To Unitydesignpatterns
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Entitas6,2721711 days ago2September 16, 2021123mitC#
Entitas is a super fast Entity Component System (ECS) Framework specifically made for C# and Unity
Unity Design Pattern1,521
3 years ago1C#
:tea: All Gang of Four Design Patterns written in Unity C# with many examples. And some Game Programming Patterns written in Unity C#. | 各种设计模式的Unity3D C#版本实现
Unity Programming Patterns1,479
10 days ago2mitC#
Implementations of programming design patterns in Unity with examples in C# when to use them
Unity Design Patterns676
4 years ago3cc0-1.0C#
Examples of programming design patterns in Unity C#
Ecsrx4551114 months ago66May 05, 20221mitC#
A reactive take on the ECS pattern for .net game developers
Zinnia.unity301123222 days ago77June 16, 202231mitC#
A collection of design patterns for solving common problems.
5 years ago1mitC#
The best way to implement singleton pattern in Unity.
Unimob11732 months ago2May 22, 2022mitC#
Modern reactive programming library for Unity (inspired by MobX js)
16 days agomitC#
Design Patterns Code for Unity Games + C++/OpenGL renders.
10 months agomitC#
MVC Pattern Framework for Unity3d GUI System (UGUI)
Alternatives To Unitydesignpatterns
Select To Compare

Alternative Project Comparisons

Programming Design Patterns in Unity3D & C#

Why should you learn Design Patterns?

Code Complete 2nd ed. by Steve McConnell says:

Design patterns provide the cores of ready-made solutions that can be used to solve many of softwares most common problems. Some software problems require solutions that are derived from first principles. But most problems are similar to past problems, and those can be solved using similar solutions, or patterns ...

Patterns provide several benefits that fully custom design doesnt: they reduce complexity by providing ready-made abstractions If you say, This code uses a Factory Method to create instances of derived classes, other programmers on your project will understand that your code involves a fairly rich set of inter-relationships and programming protocols, all of which are invoked when you refer to the design pattern of Factory Method. The Factory Method is a pattern that allows you to instantiate any class derived from a specific base class without needing to keep track of the individual derived classes anywhere but the Factory Method.

You dont have to spell out every line of code for other programmers to understand the design approach found in your code. Patterns reduce errors by institutionalizing details of common solutions Software design problems contain nuances that emerge fully only after the problem has been solved once or twice (or three times, or four times, or...). Because patterns represent standardized ways of solving common problems, they embody the wisdom accumulated from years of attempting to solve those problems, and they also embody the corrections to the false attempts that people have made in solving those problems.

Using a design pattern is thus conceptually similar to using library code instead of writing your own. Sure, everybody has written a custom Quicksort a few times, but what are the odds that your custom version will be fully correct on the first try? Similarly, numerous design problems are similar enough to past problems that youre better off using a prebuilt design solution than creating a novel solution.

Patterns provide heuristic value by suggesting design alternatives A designer whos familiar with common patterns can easily run through a list of patterns and ask Which of these patterns fits my design problem? Cycling through a set of familiar alternatives is immeasurably easier than creating a custom design solution out of whole cloth. And the code arising from a familiar pattern will also be easier for readers of the code to understand than fully custom code would be.

Patterns streamline communication by moving the design dialog to a higher level In addition to their complexity-management benefit, design patterns can accelerate design discussions by allowing designers to think and discuss at a larger level of gran- ularity. If you say I cant decide whether I should use a Creator or a Factory Method in this situation, youve communicated a great deal with just a few wordsas long as you and your listener are both familiar with those patterns. Imagine how much longer it would take you to dive into the details of the code for a Creator pattern and the code for a Factory Method pattern and then compare and contrast the two approaches.

Patterns are familiar to most experienced programmers, and assigning recognizable names to them supports efficient and effective com- munication about them.

One potential trap with patterns is force-fitting code to use a pattern. In some cases, shifting code slightly to conform to a well-recognized pattern will improve understandability of the code. But if the code has to be shifted too far, forcing it to look like a standard pattern can sometimes increase complexity.

Another potential trap with patterns is feature-itis: using a pattern because of a desire to try out a pattern rather than because the pattern is an appropriate design solution. Overall, design patterns are a powerful tool for managing complexity."

The repository contains a variety of Design Patterns with a basic description, when to use it, notes, the code structure and examples.

Most of the of references are listed on the bottom of this page, as well as more specific references are listed in each pattern description.

Behavioral Patterns

  1. Command
  2. Observer
  3. State Machine
  4. Strategy

Creational Patterns

  1. Abstract Factory
  2. Factory Method
  3. Singleton
  4. Prototype

Game Programming Patterns

  1. Object Pool
  2. Subclass Sandbox
  3. Service Locator
  4. Type Object

Structural Patterns

  1. Composite
  2. Bridge


  1. Youtube Playlist Christopher Okhravi
  2. Youtube Playlist Derek Banas
  3. Bob Nystrom Game Programmings Patterns
  4. Github examples in Unity Qian Mo
  5. Github examples in Unity Rivello
  6. Github examples in Unity Naphier
  7. Quick look, UML and examples Source Making
  8. Quick look, UML and examples Guru
  9. Quick look and examples Habrador
Popular Unity3d Projects
Popular Design Pattern Projects
Popular Games Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
C Sharp
Game Development
Design Pattern
State Machine
Game Programming
Architectural Patterns