using UnityEngine;

namespace _test.Singleton.NormalSingleton
{
    public class NormalSingleton : MonoBehaviour
    {
        public static NormalSingleton Instance { get; private set; }

        private void Awake()
        {
            if (Instance != null && Instance != this)
            {
                Destroy(gameObject);
                return;
            }

            Instance = this;
            DontDestroyOnLoad(gameObject);
        }

        public void SayHello()
        {
            Debug.Log("Hello World from NormalSingleton!");
        }
    }
}