Game Development Reference
In-Depth Information
Figure 8-5. Creating a main menu object from a combination of GUIObject, GUIOptions and a sprite renderer component
Notice in Figure 8-5 that the viewport texture-wire display shows the general sprite topology for the
menu object. Unity has autotopologized the mesh with multiple edges running downward through
the length of the sprite. This is more topology than really required for such a GUI sprite. In this
case, a quad mesh would be more suitable. You can change this, if you want, by selecting the atlas
texture in the Project panel, and from the Object Inspector, changing the Mesh Type from Tight to
Full Rect . This ensures all sprites in the atlas will use quad meshes rather than tightly generated
meshes. However, tightly generated meshes, conforming more closely to the sprite pixel data, can
result in more accurate collisions. You'll need to make careful judgments about the mesh type most
appropriate for your sprites (see Figure 8-6 ).
 
Search WWH ::




Custom Search