保护资源管理文件的相关内容 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
}

 

相关文章:

  • 2021-08-01
  • 2021-12-24
  • 2021-09-07
  • 2022-12-23
  • 2022-12-23
  • 2021-04-30
  • 2022-01-22
  • 2021-04-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2021-12-06
  • 2021-11-24
  • 2021-12-10
相关资源
相似解决方案