Ejemplo n.º 1
0
    private void OnSceneUnpublished(PublishSceneResultPayload current, PublishSceneResultPayload previous)
    {
        DataStore.i.dataStoreBuilderInWorld.unpublishSceneResult.OnChange -= OnSceneUnpublished;
        CoroutineStarter.Stop(fakeProgressRoutine);

        if (current.ok)
        {
            view.SetSuccess(TITLE, SUCCESS_DESCRIPTION);
        }
        else
        {
            view.SetError(ERROR_TITLE, current.error);
        }
    }
        public void ShowErrorCorrectly()
        {
            const string error = "Some Error";

            IUnpublishPopupView iview = view;

            iview.SetError("", error);
            Assert.AreEqual(error, view.errorText.text);

            Assert.IsFalse(view.loadingBarContainer.gameObject.activeSelf);
            Assert.IsFalse(view.cancelButton.gameObject.activeSelf);
            Assert.IsFalse(view.unpublishButton.gameObject.activeSelf);
            Assert.IsFalse(view.infoText.gameObject.activeSelf);
            Assert.IsTrue(view.doneButton.gameObject.activeSelf);
            Assert.IsTrue(view.errorText.gameObject.activeSelf);
            Assert.IsTrue(view.closeButton.gameObject.activeSelf);
        }