maint: added livewatch asset
This commit is contained in:
22
Assets/Plugins/LiveWatchLite/Scripts/Utilities/Singleton.cs
Normal file
22
Assets/Plugins/LiveWatchLite/Scripts/Utilities/Singleton.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ingvar.LiveWatch
|
||||
{
|
||||
public abstract class Singleton<T> where T : new()
|
||||
{
|
||||
public static T instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance != null)
|
||||
return _instance;
|
||||
|
||||
_instance = new T();
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
private static T _instance;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user