Currently, I am scrolling a UI RawImage using the following:
[SerializeField] private RawImage _imageToScroll;
[SerializeField] private float _x, _y;
// Update is called once per frame
void Update()
{
_imageToScroll.uvRect = new Rect(_imageToScroll.uvRect.position + new Vector2(_x, _y) * Time.deltaTime, _imageToScroll.uvRect.size);
}
However, I'd like to use a regular Image, rather than RawImage.
The reason I'd like to switch to using a regular Image is because I need to tile an image to fill the dialogue box below:
From what I can tell, RawImage doesn't seem to allow for tiling the way Image does. Is there a similar and simple way to accomplish this scrolling effect with Image?
