void ExtendTileMap() { if (curTileMap == null) { return; } if (tilePrefab == null) { Debug.LogError("failed to ExtendTileMap. null tilePrefab."); return; } // clear ClearAboutPathTest(); curTileMap.InitTileMapEngine(); // new tilenode group gameobject GameObject tileMapNodeGroup = curTileMap.NodeGroup; // create tile-map-nodes int nodeIndex = 0; for (int y = 0; y < tileHeightCount; ++y) { for (int x = 0; x < tileWidthCount; ++x, ++nodeIndex) { SquareTileMapNode node = TileMapEngine.Instance.GetTileNode(new TilePos(x, y)); if (node == null) { MakeTileMapOneTile(nodeIndex, x, y, tilePrefab, tileMapNodeGroup); } else { node.Init(nodeIndex, x, y); EditorUtility.SetDirty(node); } } } curTileMap.ExtendFromEditor(tileWidthCount, tileHeightCount); EditorUtility.SetDirty(curTileMap); // connect eachother nodes MakeConnectionEachOtherNodes(); }