Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: ryan on November 12, 2013, 06:16:29 PM

Title: UIAtlasMaker public API
Post by: ryan on November 12, 2013, 06:16:29 PM
Would you mind exposing more of the atlas maker's functionality?  I'm trying to automate updating all of the sprites in an atlas from a directory containing the textures, and it's really slow doing it one at a time, and I can't remove sprites with what's currently public.  I'm looking for something along these lines:

  1.         public static void UpdateAtlas(UIAtlas atlas, List<Texture> textures, bool keepSprites)
  2.         {
  3.                 if (atlas != null && textures != null)
  4.                 {
  5.                         List<SpriteEntry> sprites = CreateSprites(textures);
  6.                         ExtractSprites(atlas, sprites);
  7.                         if (!keepSprites)
  8.                         {
  9.                                 sprites.RemoveAll((se) => (textures.Find((t) => t.name == se.name) == null));
  10.                         }
  11.                         UpdateAtlas(atlas, sprites);
  12.                 }
  13.         }
  14.  
Title: Re: UIAtlasMaker public API
Post by: ArenMook on November 13, 2013, 08:04:39 PM
Sure, I'll make it public.