protected override void Update() { base.Update(); if (Application.isPlaying && _rayHoldingHandle != ERayOrigin.NONE) { value = _scrollableSetup.SetComponentNewValue(_minPosBar.position, _maxPosBar.position, InteractionVariableContainer.GetCurrentHitPosition(_rayHoldingHandle)); } }
private void Update() { if (Application.isPlaying) { if (_rayHoldingHandle != ERayOrigin.NONE) { if (vertical && verticalScrollbar) { verticalScrollbar.value = CheckScrollbarValue(); } else if (horizontal && horizontalScrollbar) { horizontalScrollbar.value = CheckScrollbarValue(); } } } float CheckScrollbarValue() { return(_scrollableSetup.SetComponentNewValue(_minPosBar.position, _maxPosBar.position, InteractionVariableContainer.GetCurrentHitPosition(_rayHoldingHandle))); } }