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