Files
JJBB/Assets/Project/Script/LuaScripts/UI/TInstance.cs

16 lines
335 B
C#
Raw Normal View History

2024-08-23 15:49:34 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TInstance <T> where T : new(){
private static T _Instance;
public static T Instance
{
get
{
if (_Instance == null)
_Instance = new T();
return _Instance;
}
}
}