我在Scene1中有一个GameController,我把它变成了DontDestroyOnLoad。 当我加载Scene2时,我试图在Scene2中找到一个GameObject,结果是obj2是null,而obj1不是。 为什么? 我怎样才能找到GameObjectInScene2 public class GameController: MonoBehaviour private void Awake() DontDestroyOnLoad(this); {
S
我很难理解为什么当OnEnable被调用时SceneManager.sceneLoaded += OnSceneLoaded;没有被调用。我是不是做错了什么?// called first { SceneManager.sceneLoadedcalled when the game is terminated {
D