Beispiel #1
0
    public static void _GenerateAndroidAsset()
    {
        string resPath  = "Assets/Plugins/Android/assets/res_unity/";
        string filePath = resPath + "androidasset.bytes";

        if (!Directory.Exists(resPath))
        {
            Directory.CreateDirectory(resPath);
        }

        if (File.Exists(filePath))
        {
            File.Delete(filePath);
        }

        List <string> listAsset = new List <string>();

        if (Directory.Exists(AssetSrcDir))
        {
            BuildAssetList(AssetSrcDir, listAsset);
        }

        XQFileStream fs = new XQFileStream();

        fs.OpenOverWrite(filePath);

        fs.WriteInt(listAsset.Count);
        foreach (var v in listAsset)
        {
            FileInfo fi = new FileInfo(v);
            fs.WriteString2(fi.Name);
        }

        fs.Close();
    }