Ejemplo n.º 1
0
    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");
    }
Ejemplo n.º 2
0
 private void SetCloudData(string data)
 {
     print(data);
     if (data != "")
     {
         string output = data;//File.ReadAllText(Application.dataPath + "/Hello.xml");
         container = MoreAppsContainer.LoadFromText(output);
         container.Proceed();
         //Debug.Log (container.Apps [0].name);
         CreateCanvas();
     }
     else
     {
         Debug.LogError("Error with loading File");
     }
 }
Ejemplo n.º 3
0
    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");
    }