void LoadLibraryBundle(GameBundleLibrary.Entry entry, GameBuilderApplication.PlayOptions playOpts) { loadingScreen.ShowAndDo(() => { sceneController.RestartAndLoadLibraryBundle(entry, playOpts); }); }
public void OpenLocal(GameBundleLibrary.Entry entry) { gameObject.SetActive(true); gameSource = GameSource.Local; GameBundle.Metadata metadata = entry.bundle.GetMetadata(); descriptionField.text = $"<b>{metadata.name}</b>\n{metadata.description}"; Texture2D texture = entry.bundle.GetThumbnail(); SetThumbnail(texture != null ? texture : placeholderThumbnailTexture); playAction = () => OnPlayTriggered(playOpts => { LoadLibraryBundle(entry, playOpts); }); buildAction = () => popups.Show("Not implemented", "OK", () => { }); }
public void RestartAndLoadLibraryBundle(GameBundleLibrary.Entry entry, GameBuilderApplication.PlayOptions playOptions) { if (!entry.IsAutosave()) { resuming.SetBundleForResuming(entry.id); } var bundle = entry.bundle; var gameOptions = new GameBuilderApplication.GameOptions { bundleIdToLoad = entry.id, displayName = bundle.GetMetadata().name, playOptions = playOptions, thumbnailZippedJpegBytes = MaybeGetThumbnailBytes(bundle.GetThumbnail()), }; this.LoadMainSceneAsync(gameOptions); }
public static bool IsAutosave(GameBundleLibrary.Entry entry) { return(IsAutosave(entry.id)); }