private void OnDestroy() { if (patcher != null) { // Stop the patcher since this script can no longer control it patcher.SetListener(null); patcher.Cancel(); patcher = null; } }