void OnDestroy() { centerOnChild.onDragFinishedWithIndex -= SetScrollViewCenterIndex; Instance = null; }
void Awake() { Instance = this; centerOnChild = GetComponentInChildren <UICenterOnChild>(); centerOnChild.onDragFinishedWithIndex += SetScrollViewCenterIndex; }