Exemplo n.º 1
0
    private int EnumerateDRMContentFiles(string contentDir)
    {
        int num = 0;

        PSVitaDRM.ContentOpen(contentDir);
        string text = "addcont0:" + contentDir;

        OnScreenLog.Add("Found content folder: " + text);
        string[] files = Directory.GetFiles(text);
        OnScreenLog.Add(" containing " + files.Length + " files");
        string[] array = files;
        foreach (string text2 in array)
        {
            OnScreenLog.Add("  " + text2);
            num++;
            if (text2.Contains(".unity3d"))
            {
                AssetBundle val    = AssetBundle.CreateFromFile(text2);
                Object[]    array2 = val.LoadAllAssets();
                OnScreenLog.Add("  Loaded " + array2.Length + " assets from asset bundle.");
                val.Unload(false);
            }
        }
        PSVitaDRM.ContentClose(contentDir);
        return(num);
    }
    private void EnumerateDRMContent()
    {
        int num = 0;

        PSVitaDRM.DrmContentFinder drmContentFinder = default(PSVitaDRM.DrmContentFinder);
        drmContentFinder.dirHandle = -1;
        if (PSVitaDRM.ContentFinderOpen(ref drmContentFinder))
        {
            num += this.EnumerateDRMContentFiles(drmContentFinder.get_contentDir());
            while (PSVitaDRM.ContentFinderNext(ref drmContentFinder))
            {
                num += this.EnumerateDRMContentFiles(drmContentFinder.get_contentDir());
            }
            PSVitaDRM.ContentFinderClose(ref drmContentFinder);
        }
        OnScreenLog.Add("Found " + num + " files in installed DRM content");
    }
Exemplo n.º 3
0
    private void EnumerateDRMContent()
    {
        //IL_0004: Unknown result type (might be due to invalid IL or missing references)
        int num = 0;
        var val = default(PSVitaDRM.DrmContentFinder);

        val.dirHandle = -1;
        if (PSVitaDRM.ContentFinderOpen(ref val))
        {
            num += EnumerateDRMContentFiles(val.contentDir);
            while (PSVitaDRM.ContentFinderNext(ref val))
            {
                num += EnumerateDRMContentFiles(val.contentDir);
            }
            PSVitaDRM.ContentFinderClose(ref val);
        }
        OnScreenLog.Add("Found " + num + " files in installed DRM content");
    }