6 Software Practices to Keep, Shed, and Adopt in Unity

Eyas
5 min readOct 20, 2020

Software Engineers starting with game development are often looking for best practices and idiomatic techniques. You’ll find some authoritative sources of idiomatic development from talks in Unity’s Unite conference, posts on the Unity blog, and members of the community like Jason Weimann. But game development isn’t just engineering; it’s also an art. This sometimes means that getting something to work takes center stage. You might find a lot of advice along the lines of “do what works”, which, while it is valid and helpful, doesn’t quite send you down the right path when you’re still learning.

Below, I put a brief list of Software Engineering practices you should shed when starting with game development, those you should adopt, and those you should keep.

Shed: Keep it all in code

In Software Engineering, it often feels like the more you represent in code, the better off you are: you can analyze your code to find references, jump to definitions, etc. A Software Engineer might be inclined to represent their scenes, objects, and most of the game in code.

But you’ll probably want to get used to leaning more on the Unity Editor UI than you expected.

By simply setting a “Patrol Position” to an empty Game Object, you’ll already have a neat visual game editing experience.

The Unity Engine does a lot of heavy lifting in its serialization/deserialization code and in asset management. If you’re programming in Unity (at least when getting started), you’ll want to swim with the current.

Game design is also inherently visual, usually. Placing your objects in 3D space, constructing guard patrol paths, or setting up a field-of-view for those guards are all easier done while visually editing a scene than by writing down the coordinates imperatively. What’s more, if you need to modify these values later, visually doing so is less error-prone.

Adopt: Write your own Custom Editors…

--

--

Eyas

Software Engineer living in Brooklyn, NY. MIT Computer Science S.B. ’13, M.Eng. ‘14. From Amman, Jordan. Interested in politics, current affairs, and technology