using System.Collections; using System.Collections.Generic; using UnityEngine; public class DontDestroy : MonoBehaviour { void Awake() { GameObject[] objs = GameObject.FindGameObjectsWithTag("Pokemon"); GameObject[] GM = GameObject.FindGameObjectsWithTag("GameManager"); DontDestroyOnLoad(this.gameObject); } }