| 123456789101112131415161718192021222324 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- //游戏启动监听器(MonoBehaviour必须有,否则该类可能会被裁剪)
- public class GameBootListener : MonoBehaviour
- {
- //只在游戏启动时执行一次,执行顺序在场景脚本的OnEnable之后Start之前
- [RuntimeInitializeOnLoadMethod]
- private static void OnRuntimeMethodLoad()
- {
- Debug.Log("===游戏启动===");
- Debug.Log("===游戏初始化开始===");
- Object.Instantiate(Resources.Load("Prefabs/SB_EventSystem"));
- Debug.Log("SB_EventSystem Loaded");
- AudioMgr.Init();
- Debug.Log("AudioMgr Inited");
- PersistenHandler.Init();
- Debug.Log("PersistenHandler Inited");
- SmartBowLib.MsgReceiver.ins.ToString();
- Debug.Log("MsgReceiver Inited");
- Debug.Log("===游戏初始化完成===");
- }
- }
|