private void ProcessLayerDataChunk(GameObject goTilemap, Chunk chunk)
        {
            // Instantiate object to build all colliders for this chunk
            m_CurrentCollisionBuilder = new CollisionBuilder(goTilemap, m_TilePolygonDatabase, SuperImportContext);

            List <uint> tileIds = ReadTileIdsFromChunk(chunk);

            // preserve tile ids of layer
            TileIdsChunk tileIdsChunk = new TileIdsChunk()
            {
                _x       = chunk.X,
                _y       = chunk.Y,
                _width   = chunk.Width,
                _height  = chunk.Height,
                _tileIds = tileIds
            };
            SuperTileLayer superTileLayer = goTilemap.GetComponentInParent <SuperTileLayer>();

            superTileLayer.InternalAddTileIdsChunk(tileIdsChunk);

            PlaceTiles(goTilemap, chunk, tileIds);

            m_CurrentCollisionBuilder.Build(this);
            m_CurrentCollisionBuilder = null;
        }
Exemplo n.º 2
0
        private void ProcessLayerDataChunk(GameObject goTilemap, Chunk chunk)
        {
            // Instantiate object to build all colliders for this chunk
            m_CurrentCollisionBuilder = new CollisionBuilder(goTilemap, m_TilePolygonDatabase, SuperImportContext);

            var tileIds = ReadTileIdsFromChunk(chunk);

            PlaceTiles(goTilemap, chunk, tileIds);

            m_CurrentCollisionBuilder.Build(this);
            m_CurrentCollisionBuilder = null;
        }