Example #1
0
 public LDtkNativePrefabAssets(LDtkProjectImporter importer, LDtkArtifactAssets assets, string path)
 {
     _importer   = importer;
     _path       = path;
     _assets     = assets;
     _oldSprite  = LDtkResourcesLoader.LoadDefaultTileSprite();
     _newTexture = Texture2D.whiteTexture;
 }
        private void TryBuildSimpleBgColor()
        {
            if (!_importer.CreateBackgroundColor)
            {
                return;
            }

            SpriteRenderer renderer = CreateGameObject("_BgColor");

            renderer.sprite = LDtkResourcesLoader.LoadDefaultTileSprite();
            renderer.color  = _level.UnityBgColor;

            _layerSortingOrder.Next();
            renderer.sortingOrder = _layerSortingOrder.SortingOrderValue;

            ManipulateColorTransform(renderer.transform);
        }