using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DontDestroyOnLoad : MonoBehaviour
{
    public static DontDestroyOnLoad instance;
    // Start is called before the first frame update
    void Start()
    {
            if (instance == null)
            {
                instance = this;
                DontDestroyOnLoad(transform.gameObject);
            }
            else if (instance != this)
                Destroy(gameObject);
    }

}
