Ejemplo n.º 1
0
    void Awake()
    {
        Instance = this;

        // 不销毁游戏对象
        DontDestroyOnLoad(gameObject);

        // 注册MotionEngine日志系统
        LogSystem.RegisterCallback(HandleMotionEngineLog);

        // 设置协程脚本
        Engine.Instance.InitCoroutineBehaviour(this);

        // 初始化调试控制台
        if (Application.isEditor || Debug.isDebugBuild)
        {
            DebugConsole.Init();
        }

        // 初始化应用
        InitAppliaction();
    }
 private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
 {
     Instance.Init();
 }