Skip to content

Latest commit

 

History

History
45 lines (28 loc) · 1.31 KB

File metadata and controls

45 lines (28 loc) · 1.31 KB

UnitySnippets

Collection of useful modern snippets to use in unity!

The motivation for this repo is for Training in Generics, better code patterns/practices and smart use of the great coding language (C#) together with a great tool (Unity).

This collection can be used in your next project, remember to mention the source!

========================================================

Next Item to be added: Unity and Html, love or hate?

Super responsive Unity UI AR Apps, yes it is possible

========================================================

ObserverPattern

Useful to detect changes on values

Factory Pattern

Simple generic Factory Pattern

DI (Dependency Injection)

Tentative to create a smart DI for Unity/C#. The general idea is to have classes instantiated/shared across the system without the need to manually instantiate or handle.

Currently it only works with 1 DI

The end result will be:

  • Work with multiple DI directly set on the monobehavior
  • High performance caching for instances
  • Instantiate monobehaviors

More to come, like:

Observer Pattern to existing objects (Example: Slider.Value)

MVC Pattern

Best Singleton usage in Unity

UI Snippets for ScrollRect performance, Buttons

Compiler directives

Bootloader for your App, fast stuff

how to use this stuff demos

and more...