You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewNullReferenceException($"Singleton<{typeof(T).Name}>.GetInstance() failed. The requested type singleton is not initialized and for that reason it's instance is null.");
returnInstance;
}
publicstaticvoidSetInstance<T1>()whereT1:class,T
{
Instance=Singleton<T1>.GetInstance();
}
staticSingleton()
{
Instance=Activator.CreateInstance<T>();
if(Instance.CheckDependencies())
Instance.Initialize();
else{
UnityEngine.Debug.LogWarning($"Couldn't initialite Singleton<{typeof(T).Name}>, is one of it's dependencies missing?");