using System.Collections; using System.Collections.Generic; using UnityEngine; public class DontDestory : MonoBehaviour { public static DontDestory Instance { get; set; }//µ„Ąż private void Awake() { if (Instance != null) { Destroy(gameObject); } else { Instance = this; DontDestroyOnLoad(this); } } // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } }