Game Design Patterns: Flyweight

Jared Amlin
Level Up Coding

--

Using the flyweight pattern is a great way to optimize performance in your game, especially concerning large volumes of prefabs (reusable objects) and script instances. When using prefabs, you can save performance by reusing a copy of that object. While each instance of that object has a shared material, and uses the same script, it still creates a unique instance of that script. When working with thousands, or tens of thousands of…

--

--

I am an artist and musician, that is currently diving headfirst into game development with C# and Unity3D.