Beispiel #1
0
    // Update is called once per frame
    IEnumerator WaitForRead()
    {
        yield return(new WaitForSeconds(1));

        byte[] data2 = IOUtils.ReadFileFromPersistent("MyTest.kk");
        string text2 = IOUtils.Byte2String(data2);

        GetComponent <UINode>().GetRef("Text").GetComponent <Text>().text += text2;
    }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        byte[] byteData = IOUtils.ReadFileFromStreamingAssets("hello.txt");
        string text     = IOUtils.Byte2String(byteData);

        GetComponent <UINode>().GetRef("Text").GetComponent <Text>().text = text;

        string testStr = "\n\rtemp4567";

        IOUtils.SaveFile(testStr, "MyTest.kk");

        StartCoroutine(WaitForRead());

        LoadABTest();

        StartCoroutine(LoadABAsync());

        LoadManifestTest();

        LoadTxtTest();
    }