-
-
Save MarshMello0/014e72ea3b40c920bd5a82b1011c54c4 to your computer and use it in GitHub Desktop.
[Unity] This script stops the ability to mouse drag on the ScrollRect component in unity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine.UI; | |
using UnityEngine.EventSystems; | |
public class CustomScrollRect : ScrollRect | |
{ | |
//Overriding it so we dont mouse drag | |
public override void OnBeginDrag(PointerEventData eventData) { } | |
public override void OnDrag(PointerEventData eventData) { } | |
public override void OnEndDrag(PointerEventData eventData) { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment