示例#1
0
        public void Awake()
        {
            if (Instance != null)
            {
                Destroy(Instance.gameObject);
            }

            Instance = this;
            DontDestroyOnLoad(gameObject);
        }
示例#2
0
 private void Start()
 {
     CrossSceneObject.AddObject(gameObject);
 }