public void Load() { State = PYBundleManagerState.Loading; // Prepare subsystems to load _totalAmountBundlesToLoad = Content.PrepareToLoad(); _totalAmountBundlesToLoad += Data.PrepareToLoad(); _totalAmountBundlesToLoad += Localization.PrepareToLoad(); onStartLoading.Invoke(new PYBundleManagerEventData()); WriteLog("\n***** " + string.Format(LOG_TIME_PREFIX, DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"), "Starting " + PlaytableWin32.GameName + " v" + PlaytableWin32.GameVersion + " accepting bundles with version greater or equals to v" + PlaytableWin32.BundleVersion + " *****")); // Load subsystems Content.Load(() => { Data.Load(() => { Localization.Load(() => { State = PYBundleManagerState.Ready; onLoadCompleted.Invoke(new PYBundleManagerEventData() { IsDoneLoading = true, ProgressLoading = 1f }); }); }); }); }
public void Unload(bool unloadAllAssets) { State = PYBundleManagerState.None; Content.UnloadBundle(unloadAllAssets); Data.UnloadBundle(unloadAllAssets); Localization.UnloadBundle(unloadAllAssets); onUnloadCompleted.Invoke(new PYBundleManagerEventData()); }