Esempio n. 1
0
        private static void BuildIntGridLayer(LDtkDataLayer layer, LDtkIntGridValueAssetCollection intGridValueAssets,
                                              Grid tilemapPrefab)
        {
            if (IsAssetNull(intGridValueAssets))
            {
                return;
            }
            if (IsAssetNull(tilemapPrefab))
            {
                return;
            }

            DecrementLayer();

            Tilemap tilemap = LDtkUnityTilesetBuilder.BuildUnityTileset(layer.__identifier, tilemapPrefab, _layerSortingOrder);

            if (tilemap == null)
            {
                return;
            }

            LDtkBuilderIntGridValue.BuildIntGridValues(layer, intGridValueAssets, tilemap);

            LDtkUnityTilesetBuilder.SetTilesetOpacity(tilemap, layer.__opacity);
        }
Esempio n. 2
0
        private static void BuildIntGridLayer(LDtkDataLayer layer, LDtkIntGridValueAssetCollection intGridValueAssets,
                                              Grid tilemapPrefab)
        {
            if (IsAssetNull(intGridValueAssets))
            {
                return;
            }

            string objName = layer.__identifier;

            Tilemap tilemap = BuildUnityTileset(objName, tilemapPrefab);

            if (tilemap == null)
            {
                return;
            }

            LDtkBuilderIntGridValue.BuildIntGridValues(layer, intGridValueAssets, tilemap);
        }