public void Generate() { Setup(); //Assign the material. m_Renderer.sharedMaterial = m_Material; //Get the scale setup. transform.localScale = Vector3.one * m_Scale; //Assign the mesh and the material. m_Filter.GenerateGrid(m_DetailLevel, true); }