private void DEBUG_INIT() { MoreAppsContainer container = new MoreAppsContainer(); AppContainer app = new AppContainer(); app.Name = "hello world"; //app.imageByte = text.EncodeToPNG (); app.href = "http://bartoszswiety.com"; container.Apps = new AppContainer[2]; container.Apps[0] = app; app.Name = "chuj"; container.Apps[1] = app; container.Save(Application.dataPath + "/MoreApps.xml"); }
public static void GenerateXML(Texture2D[] icons, string[] urls, string[] name, string header) { Debug.Log("Generating XML"); MoreAppsContainer container = new MoreAppsContainer(); container.Apps = new AppContainer[icons.Length]; container.Header = header; for (int i = 0; i < urls.Length; i++) { AppContainer app = new AppContainer(); app.Name = name[i]; app.href = urls[i]; app.imageByte = icons[i].EncodeToPNG(); container.Apps[i] = app; } container.Save(Application.dataPath + "/MoreApps.xml"); Debug.Log("XML Generated : " + Application.dataPath + "/MoreApps.xml"); }