public PlayAssetBundleRequestImpl(string mainAssetBundleName, AssetPackManager assetPackManager,
                                   PlayAssetBundleRequestRepository requestRepository)
 {
     MainAssetBundleName = mainAssetBundleName;
     _assetPackManager   = assetPackManager;
     _requestRepository  = requestRepository;
 }
 private void Init(AssetPackManager assetPackManager, PlayAssetBundleRequestRepository requestRepository)
 {
     _assetPackManager    = assetPackManager;
     _requestRepository   = requestRepository;
     _stateUpdateListener = new AssetPackStateUpdateListener();
     _stateUpdateListener.OnStateUpdateEvent += OnStateUpdateReceived;
     StartListeningForUpdates();
 }
        public static AssetDeliveryUpdateHandler CreateInScene(AssetPackManager assetPackManager,
                                                               PlayAssetBundleRequestRepository requestRepository)
        {
            var componentHolder = new GameObject();

            DontDestroyOnLoad(componentHolder);
            componentHolder.name = "AssetDeliveryUpdateHandler";

            var instance = componentHolder.AddComponent <AssetDeliveryUpdateHandler>();

            instance.Init(assetPackManager, requestRepository);

            return(instance);
        }