if anybody want - you can use code like this: (use from editor script)
public static string PathAtlas = "Assets/w_Test/testautoatlas.prefab";
public static string PathSource = "/w_Test/autosprites";
[MenuItem("project/Update Test Atlas")]
private static void UpdateAtlas()
{
UIAtlas teastatlas = null;
GameObject go = AssetDatabase.LoadAssetAtPath(PathAtlas, typeof(GameObject)) as GameObject;
if (go != null)
{
teastatlas = go.GetComponent<UIAtlas>();
}
string[] spritesStr = Directory.GetFiles(Application.dataPath + PathSource, "*.png");
foreach (var str in spritesStr)
{
string assetPath = "Assets" + str.Replace(Application.dataPath, "").Replace('\\', '/');
Texture tex = (Texture2D)AssetDatabase.LoadAssetAtPath(assetPath, typeof(Texture2D));
if (tex != null)
{
UIAtlasMaker.AddOrUpdate(teastatlas, (Texture2D) tex);
}
}
}