예제 #1
0
 private void OnDestroy()
 {
     if (m_EncryptResourceWorker != null)
     {
         m_EncryptResourceWorker.Close();
         m_EncryptResourceWorker = null;
     }
 }
예제 #2
0
        // Load AssetBundleManifest.
        static public AssetBundleLoadManifestOperation Initialize(string manifestAssetBundleName)
        {
            var go = new GameObject("AssetBundleManager", typeof(AssetBundleManager));

            DontDestroyOnLoad(go);

#if UNITY_EDITOR
            // If we're in Editor simulation mode, we don't need the manifest assetBundle.
            if (SimulateAssetBundleInEditor)
            {
                return(null);
            }
#endif
            SetEncryptSets();
            m_EncryptResourceWorker = new EncryptResourceWorker();

            LoadAssetBundle(manifestAssetBundleName, true);
            var operation = new AssetBundleLoadManifestOperation(manifestAssetBundleName, "AssetBundleManifest", typeof(AssetBundleManifest));
            m_InProgressOperations.Add(operation);
            return(operation);
        }