Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

Favor Small Components in Unity

$
0
0

A common mistake many developers make when making their first game is trying to cram too much functionality into a single class. This violates the single responsibility principle. When designing your classes they should only do one thing and do it well. A good rule is if you need to use the word 'and' to describe what a class does, it should probably be broken up into multiple classes. There are a couple of good reasons why want to break up your classes

Small Classes Make Your Code More Reusable

By breaking down your code into smaller pieces you make …


Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>