Procedural meshes

Although Unity now offers a Quad primitive from the application menu, which you can access by navigating to GameObject | 3D Object | Quad, it's still useful to know how to create geometry manually, such as Quads. There are several reasons for this. First, you'll frequently need to edit vertices in the script to move, animate, or distort meshes for various effects to create, for example, a jelly-like surface in a platform game that bends and wobbles whenever characters step on it. Second, you'll need to edit the UV coordinates of a mesh, perhaps, to create animated or scrolling-texture effects, as shown here:

Procedural meshes

Generating meshes from ...

Get Mastering Unity Scripting now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.