public PlayAssetBundleRequestImpl(string mainAssetBundleName, AssetPackManager assetPackManager,
                                   PlayAssetBundleRequestRepository requestRepository)
 {
     MainAssetBundleName = mainAssetBundleName;
     _assetPackManager   = assetPackManager;
     _requestRepository  = requestRepository;
 }
Esempio n. 2
0
 internal PlayAssetDeliveryInternal()
 {
     _assetPackManager = new AssetPackManager();
     _updateHandler    = AssetDeliveryUpdateHandler.CreateInScene(_assetPackManager, _requestRepository);
     _updateHandler.OnStateUpdateEvent += ProcessPackStateUpdate;
     PlayCoreEventHandler.CreateInScene();
 }
Esempio n. 3
0
 public PlayAssetPackRequestImpl(string assetPackName, AssetPackManager assetPackManager,
                                 PlayRequestRepository requestRepository)
 {
     AssetPackName      = assetPackName;
     _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);
        }