﻿using Lovense.UnityKit.Dongle;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;

class DongleGlobal : MonoBehaviour
{
    public List<LovenseDongleToy> thisToys;

    private static DongleGlobal Instance;

    [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
    private static void Init()
    {
        var g = new GameObject("LovesenDongleGlobal");
        Instance = g.AddComponent<DongleGlobal>();
        DontDestroyOnLoad(g.gameObject);
    }

    public static DongleGlobal GetInstance()
    {
        if (Instance == null)
        {
            Init();
        }
        return Instance;
    }
}
