Browse Source

防裁剪

lvjincheng 2 years ago
parent
commit
127e363bf5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Assets/BowArrow/Scripts/GameBootListener.cs

+ 2 - 2
Assets/BowArrow/Scripts/GameBootListener.cs

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