July 2017
Beginner to intermediate
390 pages
10h 53m
English
If you run it now and wait for a couple of seconds, you will see a screen filled with one color and a sphere. This is probably not what you expected, but this makes sense. The code we just wrote generates meshes and, since we gave it a MeshRenderer, it will draw these on screen. We did not specify a material, so it will use the default material and fill our whole world with it.
Add the following couple of lines to your class:
private void OnPreRender()
{
GL.wireframe = true;
}
private void OnPostRender()
{
GL.wireframe = false;
}
This turns the wireframing on during the PreRender of our class, and turns it back off again when rendering is done.
Now run the app and have a look. You will see the meshes being rendered as the spatial ...
Read now
Unlock full access