/*
 * @license Private Source License v1.0.0
 * @copyright 2023 Reinhardt Weyers
 *
 * @author Reinhardt Weyers
 *
 * @version 0.1.0
 * 
 * Created On: 04/12/25
 * Last edited: 04/12/25
 */

using UnityEngine;

namespace RetroDev.Networking
{
    public class RequestRunner : MonoBehaviour
    {
        private static RequestRunner _instance;

        // Ensure that a runner is instantiated at the time the class is accessed
        public static RequestRunner Instance
        {
            get
            {
                if (_instance == null)
                {
                    GameObject obj = new GameObject("CoroutineRunner");
                    _instance = obj.AddComponent<RequestRunner>();
                    DontDestroyOnLoad(obj);
                }
                return _instance;
            }
        }
    }
}
