ScrollSettingsBehaviour.cs 560 B

123456789101112131415161718192021222324
  1. using System;
  2. using SRDebugger.Internal;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. namespace SRDebugger.UI.Other
  6. {
  7. [RequireComponent(typeof(ScrollRect))]
  8. public class ScrollSettingsBehaviour : MonoBehaviour
  9. {
  10. private void Awake()
  11. {
  12. ScrollRect component = base.GetComponent<ScrollRect>();
  13. component.scrollSensitivity = 40f;
  14. if (!SRDebuggerUtil.IsMobilePlatform)
  15. {
  16. component.movementType = ScrollRect.MovementType.Clamped;
  17. component.inertia = false;
  18. }
  19. }
  20. public const float ScrollSensitivity = 40f;
  21. }
  22. }