Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw exeecption on Scene Service void Deactivate<T> if delegate wasn't found on a cene #24

Open
stan-osipov opened this issue Jun 25, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@stan-osipov
Copy link
Contributor

 if (AdditiveScenesLoader.TryGetLoadedScene(sceneName, out var scene))
            {
                var sceneManager = FindMonoTypeOnSceneRoot<T>(scene);
                var sceneDelegate = FindMonoTypeOnSceneRoot<ISceneDelegate>(scene);
                sceneDelegate?.DeactivateScene(() =>
                {
                    onComplete?.Invoke(sceneManager);
                });
            }
            else
            {
               throw new InvalidOperationException($"{nameof(SceneLoadService)} can not deactivate {sceneName} scene, because it wasn't loaded. ");
            }
@stan-osipov stan-osipov added the bug Something isn't working label Jun 25, 2021
@stan-osipov stan-osipov self-assigned this Jun 25, 2021
@asd1989dsa asd1989dsa self-assigned this Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants