public override void Unload()
 {
     base.Unload();
     if (playAssetPackRequest != null)
     {
         playAssetPackRequest.AttemptCancel();
         playAssetPackRequest = null;
     }
 }
        /// <summary>
        /// Cancels the current asset pack download.
        /// </summary>
        public void ButtonEventCancelDownload()
        {
            // Defensive check. In practice the CancelDownloadButton should be hidden if the request is null.
            if (_request == null)
            {
                return;
            }

            _request.AttemptCancel();
        }
示例#3
0
 public void Unload()
 {
     if (assetBundle != null)
     {
         assetBundle.Unload(true);
         assetBundle = null;
     }
     if (playAssetPackRequest != null)
     {
         playAssetPackRequest.AttemptCancel();
         playAssetPackRequest = null;
     }
 }