예제 #1
0
    private static LoadingManager ExecuteLoading(string scene, System.Action onStart, System.Action onEnd, string message)
    {
        if (LoadingManager.InstanceAwake() != null)
        {
            return(LoadingManager.Instance
                   .RegisterEvent(onStart, onEnd)
                   .Execute(scene, true, true, message));
        }

        if (!ReferenceEquals(onStart, null))
        {
            onStart();
        }

        UnityEngine.SceneManagement.SceneManager.LoadScene(scene);

        if (!ReferenceEquals(onEnd, null))
        {
            onEnd();
        }

        LogGame.Log("[Loading Manager] Loading with default scene load system!");

        return(null);
    }