예제 #1
0
    protected void Update()
    {
        //None -> Inited -> PostInited
        if (_sceneLoadingState == SceneLoadingState.None)
        {
            // If there is no previous scene, it is judged as a single scene call
            _selfLoading = SceneLoadingManager.IsSelfLoading();

            if (_selfLoading)
            {
                Init();
            }
        }
        else if (_sceneLoadingState == SceneLoadingState.Inited)
        {
            if (_selfLoading)
            {
                DoPostInit();
            }
        }
        else if (_sceneLoadingState == SceneLoadingState.PostInited)
        {
            OnUpdate();
        }
    }
예제 #2
0
파일: EAScene.cs 프로젝트: puos/EAProjectV2
    protected virtual void Awake()
    {
        if (instance != null && !object.ReferenceEquals(this, instance))
        {
            DestroyImmediate(gameObject);
            return;
        }

        instance = this;

        Init();

        if (SceneLoadingManager.IsSelfLoading())
        {
            OnSetting();
        }
    }