Books
Chris Dickinson

Unity 5 Game Optimization

Master performance optimization for Unity3D applications with tips and techniques that cover every aspect of the Unity3D Engine
About This BookOptimize CPU cycles, memory usage, and GPU throughput for any Unity3D applicationMaster optimization techniques across all Unity Engine features including Scripting, Asset Management, Physics, Graphics Features, and ShadersA practical guide to exploring Unity Engine's many performance-enhancing methodsWho This Book Is ForThis book is intended for intermediate and advanced Unity developers who have experience with most of Unity's feature-set, and who want to maximize the performance of their game. Familiarity with the C# language will be needed.
What You Will LearnUse the Unity Profiler to find bottlenecks anywhere in our application, and discover how to resolve themImplement best-practices for C# scripting to avoid common pitfallsDevelop a solid understanding of the rendering pipeline, and maximize its performance through reducing draw calls and avoiding fill rate bottlenecksEnhance shaders in a way that is accessible to most developers, optimizing them through subtle yet effective performance tweaksKeep our scenes as dynamic as possible by making the most of the Physics engineOrganize, filter, and compress our art assets to maximize performance while maintaining high qualityPull back the veil on the Mono Framework and the C# Language to implement low-level enhancements that maximize memory usage and avoid garbage collectionGet to know the best practices for project organization to save time through an improved workflowIn DetailCompetition within the gaming industry has become significantly fiercer in recent years with the adoption of game development frameworks such as Unity3D. Through its massive feature-set and ease-of-use, Unity helps put some of the best processing and rendering technology in the hands of hobbyists and professionals alike. This has led to an enormous explosion of talent, which has made it critical to ensure our games stand out from the crowd through a high level of quality. A good user experience is essential to create a solid product that our users will enjoy for many years to come.
Nothing turns gamers away from a game faster than a poor user-experience. Input latency, slow rendering, broken physics, stutters, freezes, and crashes are among a gamer's worst nightmares and it's up to us as game developers to ensure this never happens. High performance does not need to be limited to games with the biggest teams and budgets.
Initially, you will explore the major features of the Unity3D Engine from top to bottom, investigating a multitude of ways we can improve application performance starting with the detection and analysis of bottlenecks. You'll then gain an understanding of possible solutions and how to implement them. You will then learn everything you need to know about where performance bottlenecks can be found, why they happen, and how to work around them.
This book gathers a massive wealth of knowledge together in one place, saving many hours of research and can be used as a quick reference to solve specific issues that arise during product development.
Style and approachThis book is organized based on the major features of Unity engine and should be treated as a reference guide. It is written as a series of investigations into both common and unusual performance pitfalls, each including a study on why the bottleneck is causing us problems, and a list of enhancements or features that can be used to work around them. Differences in effectiveness, behaviors, or feature-sets between Unity 4.x and Unity 5.x will be highlighted.
411 printed pages
Publication year
2015
Have you already read it? How did you like it?
👍👎

Quotes

  • Timur Ahmetovhas quoted7 years ago
    In fact, creating Poolable Components that are not self-contained, and tend to tinker with other Components like this, is one of the biggest dangers of implementing a pooling system. We should minimize such implementations, and routinely verify them when we're trying to debug strange issues in our game.
  • Timur Ahmetovhas quoted7 years ago
    Prefab pooling
    The previous pooling solution is useful for typical classes, but it won't work for special Unity objects, such as GameObject and MonoBehaviour. These objects tend to consume a large chunk of our runtime memory, can cost us a great deal of CPU usage when they're created and destroyed, and tend to risk a large amount of garbage collection at runtime. In other words, the main goal of Prefab pooling is to push the overwhelming majority of object instantiation to Scene initialization, rather than letting them get created at runtime. This can provide some big runtime CPU savings, and avoids a lot of spikes caused by object creation/destruction and garbage collection, at the expense of Scene loading times, and runtime memory consumption. As a result, there are quite a few pooling solutions available on the Asset Store for handling this task, with varying degrees of simplicity, quality, and feature sets.
  • Timur Ahmetovhas quoted7 years ago
    Note
    It is often recommended that pooling should be implemented in any game that intends to deploy on mobile devices, due to the greater overhead costs involved in the allocation and deallocation of memory compared to desktop applications.
    However, creating a pooling solution is an interesting topic, and building one from scratch is a great way of getting to grips with a lot of important internal Unity Engine behavior. Also, knowing how such a system is built makes it easier to extend if we wish it to meet the needs of our particular game, rather than relying on a prebuilt solution.
    The general idea of Prefab pooling is to create a system that contains lists of active and inactive GameObjects that were all instantiated from the same Prefab reference. The following diagram shows how the system might look after several spawns, despawns, and respawns of various objects derived from four different Prefabs (Orc, Troll, Ogre, and Dragon):

On the bookshelves

fb2epub
Drag & drop your files (not more than 5 at once)