Game Development Reference
In-Depth Information
Figure 4-16. The scaled CornerGarden more in keeping with the size of the Cube
4.
Deactivate the Cube in the Inspector.
Asset Optimization
No matter what platform or platforms you plan to author for, optimization is always something to
be aware of. Besides file size (important for deploying mobile apps), optimization also applies to all
types of asset management with the ultimate goal of faster frame rate. Some types of optimization,
such as batching, model creation, and mapping must be designed into the assets before import.
Other optimizations, such as the type of colliders used on an object are more flexible.
Batching Textures and Objects
The CornerGarden asset is made up of several separate meshes so that you can mix and match
them to create many different configurations. In case it occurred to you that several objects will
cost extra frame rate, don't worry. Unity “batches” objects that use the same material and have
less than 300 vertices each. Another requirement is that stored vertex information is limited to three
types. Typically, this is the x, y, and z location, normal (the direction it faces), and UV (its mapping
coordinate). This means that each mesh is limited to 900 vertex attributes. If the requirements are
met, instead of making separate draw calls for each object at render time, it can combine them into
a single draw call.
 
Search WWH ::




Custom Search