|
|
@@ -2,8 +2,8 @@ using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
using UnityEngine;
|
|
|
|
|
|
-//游戏启动监听器
|
|
|
-public class GameBootListener
|
|
|
+//游戏启动监听器(MonoBehaviour必须有,否则该类可能会被裁剪)
|
|
|
+public class GameBootListener : MonoBehaviour
|
|
|
{
|
|
|
//只在游戏启动时执行一次,执行顺序在场景脚本的OnEnable之后Start之前
|
|
|
[RuntimeInitializeOnLoadMethod]
|