Resolves the 268-error header frontier: settings Item base, ErrorDialog.Data, RoomConnectController nested types, Unity asset/light/collider types, CriWare/ CodeStage/Spine SDK surface, and copies INetworkLogger + SingletonMonoBehaviour verbatim. Per F3 this unmasks the type bodies (~26.5k member-level errors now visible) -- the real M1 bulk, attacked in following waves.
44 lines
774 B
C#
44 lines
774 B
C#
using UnityEngine;
|
|
|
|
public class SingletonMonoBehaviour<T> : MonoBehaviour where T : MonoBehaviour
|
|
{
|
|
private static T _instance;
|
|
|
|
protected bool _isRedy;
|
|
|
|
public static T instance
|
|
{
|
|
get
|
|
{
|
|
if (_instance == null)
|
|
{
|
|
_instance = (T)Object.FindObjectOfType(typeof(T));
|
|
if (_instance == null)
|
|
{
|
|
Debug.LogError(typeof(T)?.ToString() + "is nothing");
|
|
}
|
|
}
|
|
return _instance;
|
|
}
|
|
}
|
|
|
|
public bool isRedy => _isRedy;
|
|
|
|
public static bool IsInstanceEmpty()
|
|
{
|
|
return _instance == null;
|
|
}
|
|
|
|
private void Awake()
|
|
{
|
|
if (_instance == null)
|
|
{
|
|
_instance = (T)Object.FindObjectOfType(typeof(T));
|
|
if (_instance == null)
|
|
{
|
|
Debug.LogError(typeof(T)?.ToString() + "is nothing");
|
|
}
|
|
}
|
|
}
|
|
}
|