void Awake() { //Create a new mesh Mesh mesh = new Mesh(); //Give it a name mesh.name = "Procedural Grid"; //Generate the mesh mesh = GenerateGrid.GenerateMesh(mesh, width, resolution); //Give the mesh to the mesh filter GetComponent <MeshFilter>().mesh = mesh; }