Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: aikitect on August 26, 2013, 10:41:04 PM

Title: Adding "TP Import" to UIAtlas Programatically
Post by: aikitect on August 26, 2013, 10:41:04 PM
Hello,

I was looking through the UIAtlas documentation and I couldn't figure out anything about how to assign a TexturePacker text file to a UIAtlas programmatically.  In the editor, I see the option for "TP Import", but there in the documentation there is no reference of this at all.

How would I be able to generate a UIAtlas using a TexturePacker-generated atlas then?
Title: Re: Adding "TP Import" to UIAtlas Programatically
Post by: ArenMook on August 27, 2013, 02:27:54 AM
Search for "TP Import" and look what happens: NGUIJson.LoadSpriteData.
Title: Re: Adding "TP Import" to UIAtlas Programatically
Post by: aikitect on August 27, 2013, 03:01:54 PM
Does NGUIJson have some sort of namespace I can't see?  I put in:

  1. NGUIJson.LoadSpriteData(foodIconAtlas, txtRequest.asset as TextAsset);

It gives me a NGUIJson does not exist in the current context.