Protecting сontent issue

I took up the task of protecting the content like http://docs.unity3d.com/Manual/protectingcontent.html.
And I implemented a third way: store an AssetBundle itself as a TextAsset, inside another normal AssetBundles.

I export and encode scene. But after loading the text Asset, decode and reconstruct the original Asset - all objects in the scene are losing their scripts (as NGUI and mine).

Export is as follows:

BuildPipeline.BuildStreamedSceneAssetBundle(fightScenes,
assetBundleName,
EditorUserBuildSettings.activeBuildTarget,
BuildOptions.BuildAdditionalStreamedScenes | BuildOptions.UncompressedAssetBundle);
bytes = File.ReadAllBytes(assetBundleName);
bytes = FCryptography.Encode(bytes);
string encodeAssetFileName = “EncodeAsset.bytes”;
FileStream fs = File.Create(encodeAssetFileName);
fs.Write(bytes, 0, bytes.Length);
AssetDatabase.Refresh();
UnityEngine.Object asset = AssetDatabase.LoadMainAssetAtPath(encodeAssetFileName);
BuildPipeline.BuildAssetBundle(asset,
null,
encodeTextAssetFilename,
BuildAssetBundleOptions.UncompressedAssetBundle,
EditorUserBuildSettings.activeBuildTarget);

Import like this:

WWW www = [WWW.LoadFromCacheOrDownload(path](http://WWW.LoadFromCacheOrDownload(path), version);
yield return null;
AssetBundleRequest req = [www.assetBundle.LoadAsync(objName](http://www.assetBundle.LoadAsync(objName), typeof(TextAsset));
yield return req;
byte[ ] decryptedData = FCryptography.Decode(((TextAsset)req.asset).bytes);
AssetBundleCreateRequest acr = AssetBundle.CreateFromMemory(decryptedData);
yield return acr;
OnWWWLoaded(acr.assetBundle);

For security reasons, Unity doesn’t allow scripts to be included in AssetBundles.

But look into this workaround. Haven’t tried it myself though, we usually just pack models in asset bundles and have a visualy empty gameobject prefab initialize itself by loading the appropriate asset bundle and attaching relevant scripts to it

http://docs.unity3d.com/Manual/scriptsinassetbundles.html

Thank you for your reply. So it turns out that when the exported scene in Asset bundle, the script works as it should. And since then we create a TextAsset from scene asset, the scripts are lost?

Can you tell me if there is any way to protect the contents even without such tricks?