Game Development Reference
In-Depth Information
Generating meshes from script
Consider the following code sample 9-2, which should be included inside the Editor
folder of a project. It creates an editor add-on that generates a Quad in script with
full customization over the location of the mesh pivot point. As we'll see in the code
comments, this sample features many useful tips:
001 //EDITOR CLASS TO CREATE QUAD MESH WITH SPECIFIED ANCHOR
002 //------------------------------------------------
003 using UnityEngine;
004 using UnityEditor;
005 using System.IO;
006 //------------------------------------------------
007 //Run from unity editor
 
Search WWH ::




Custom Search