public void Awake() { meshRenderer = gameObject.AddComponent <MeshRenderer>(); meshFilter = gameObject.AddComponent <MeshFilter>(); mesh = new Mesh(); if (tileTypes == null) { tileTypes = TileTypes.GetTileTypes(); } }