private void Awake() { var go = new GameObject(gameObject.name + " (updater)"); updater = go.AddComponent <LargeSketchUpdater>(); updater.sketch = this; }
private void OnDestroy() { if (updater != null) { DestroyImmediate(updater.gameObject); updater = null; } }