zoukankan      html  css  js  c++  java
  • unity3d AssetBundle包加密

    原地址:http://www.cnblogs.com/88999660/archive/2013/03/15/2961587.html

    保护资源管理文件的相关内容 Unity允许用户使用AssetBundle.CreateFromMemory从一个 byte[]数组中建立一个AssetBundle的对象。在运行传输解密时,可以用这种加密方法来提高安全性和保护用户建立的资源管理中的内容。

    复制代码
    string url = "http://www.mywebsite.com/mygame/assetbundles/assetbundle1.unity3d";
    IEnumerator Start () {
    // Start a download of the given URL
    WWW www = new WWW (url);
    
    // Wait for download to complete
    yield return www;
    
    // Get the byte data
    byte[] encryptedData = www.bytes;
    
    // Load the TextAsset object
    byte[] decryptedData = YourDecryptionMethod(encryptedData);
    
    // Create an AssetBundle from the bytes array
    AssetBundle bundle = AssetBundle.CreateFromMemory(decryptedData);
    
    // You can now use your AssetBundle
    }
    复制代码
  • 相关阅读:
    第二次结对作业
    第二次编程作业
    第一次编程作业
    第一篇随笔
    个人总结
    用例图设计
    第二次个人编程作业
    第一次个人编程作业
    第一次博客作业
    个人总结-以梦为马,砥砺前行
  • 原文地址:https://www.cnblogs.com/123ing/p/3703843.html
Copyright © 2011-2022 走看看