Exemple #1
0
    IEnumerator Start()
    {
        foreach (var obj in initializebles)
        {
            var initializable = (obj as IInitializable);

            initializable?.Init();
        }

        foreach (var obj in initializebles)
        {
            var initializable = (obj as IInitializable);

            if (initializable == null)
            {
                continue;
            }

            yield return(new WaitUntil(() => initializable.Initialized));
        }

        AsyncLoader.LoadSceneAsync(mainScene, 3);

        yield return(null);
    }
 public void LoadSceneByReference()
 {
     AsyncLoader.LoadSceneAsync(scene, 3);
 }