void OnDisable() { if (_current == this) { _current = null; } }
static public void Initialize() { if (!initialized) { if (!Application.isPlaying) { return; } initialized = true; var g = new GameObject("LoomOld"); _current = g.AddComponent <LoomOld>(); GameObject.DontDestroyOnLoad(g); } }
void Awake() { _current = this; initialized = true; }