init: add project

This commit is contained in:
Bragin Stepan
2026-02-18 23:02:28 +05:00
commit 4f01e66894
620 changed files with 52253 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
using System.Collections;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace Assets._Project.Develop.Runtime.Utilities.SceneManagement
{
public class SceneLoaderService
{
public IEnumerator LoadAsync(string sceneName, LoadSceneMode loadSceneMode = LoadSceneMode.Single)
{
AsyncOperation wait = SceneManager.LoadSceneAsync(sceneName, loadSceneMode);
yield return new WaitWhile(() => wait.isDone == false);
}
public IEnumerator UnloadAsync(string sceneName)
{
AsyncOperation wait = SceneManager.UnloadSceneAsync(sceneName);
yield return new WaitWhile(() => wait.isDone == false);
}
}
}