Esempio n. 1
0
        private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets,
                                                   string[] movedFromAssetPaths)
        {
            if (PlayerPrefs.HasKey("ui_folder"))
            {
                foreach (string assetPath in importedAssets)
                {
                    if (!assetPath.Contains(PlayerPrefs.GetString("ui_folder")) || !assetPath.Contains("@sprites.bytes"))
                    {
                        continue;
                    }

                    AtlasGenerator.DoOne(assetPath);
                }
            }
            if (PlayerPrefs.HasKey("ui_bundle_folder"))
            {
                foreach (string assetPath in importedAssets)
                {
                    if (!assetPath.Contains(PlayerPrefs.GetString("ui_bundle_folder")) || !assetPath.Contains("@sprites.bytes"))
                    {
                        continue;
                    }

                    AtlasGenerator.DoOne(assetPath);
                }
            }
        }
Esempio n. 2
0
 private static void GenAtlas()
 {
     AtlasGenerator.GenAtlas();
 }