Even though Unity is a 3D game engine, it still has to follow the principles set down by the code it's built on. When you think of your game, remember that the GameObjects, components, and systems you see on screen are just visual representations of classes and data; they're not magical or unknown—they're the result of taking the programming foundations you've learned in this book to their advanced conclusion.Â
Everything in Unity is an object, but that doesn't mean all C# classes have to work within the engine's MonoBehavior framework. Don't be limited to thinking in game mechanics; branch out and define your data or behavior the way your project needs.Â
Lastly, always ask yourself how you can best separate code out into pieces of functionality instead of creating huge, bloated, thousand-line classes. Related code should be responsible for its behavior and stored together. That means creating separate MonoBehavior...