Felix Boucher 08c9171262 some tidying up
plusieurs scripts ne semblaient pas au bon endroit. Je les ai donc réorganisé un peu.
2023-05-27 20:38:43 -04:00

16 lines
447 B
C#

/// <summary>
/// this class is not a MonoBehaviour. Its purpose is to make it possible to have global classes that will not be in the scene.
/// </summary>
/// <typeparam name="T"></typeparam>
public class Singleton<T> where T : Singleton<T>, new()
{
private static T _instance;
public static T Instance
{
get
{
if (_instance == null) _instance = new T();
return _instance;
}
}
}