unity3d AssetBundle包加密
生活随笔
收集整理的這篇文章主要介紹了
unity3d AssetBundle包加密
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
原地址:http://www.cnblogs.com/88999660/archive/2013/03/15/2961587.html
保護(hù)資源管理文件的相關(guān)內(nèi)容 Unity允許用戶使用AssetBundle.CreateFromMemory從一個(gè) byte[]數(shù)組中建立一個(gè)AssetBundle的對(duì)象。在運(yùn)行傳輸解密時(shí),可以用這種加密方法來提高安全性和保護(hù)用戶建立的資源管理中的內(nèi)容。
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 }?
與50位技術(shù)專家面對(duì)面20年技術(shù)見證,附贈(zèng)技術(shù)全景圖總結(jié)
以上是生活随笔為你收集整理的unity3d AssetBundle包加密的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: oracle 与sql serve 获取
- 下一篇: http连接管理