コード例 #1
0
ファイル: AssetBundleManager.cs プロジェクト: mengtest/MyGame
 private void OnDestroy()
 {
     if (m_EncryptResourceWorker != null)
     {
         m_EncryptResourceWorker.Close();
         m_EncryptResourceWorker = null;
     }
 }
コード例 #2
0
ファイル: AssetBundleManager.cs プロジェクト: mengtest/MyGame
        // 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);
        }