I would like to slide an arrow (by changing its RectTransform anchoredPosition) over a background line. The problem is that this arrow has an alpha channel that I want to be applied to the background line as well i.e. I want the background line region that is behind the arrow not to be rendered/to have 0 Alpha.
Hierarchy goes like this:
Canvas
|-lineRawImage
|
|-arrowRawImage
Also, here are two explanatory images to better understand the problem:
Expected behavior:
Actual behavior:
Apologize for my eye-bleeding Paint skills
I had couple ideas as candidate solutions but they are not suitable/practical:
1- Merging the arrow and the background line into one image and scorlling it left and right using a scrollrect and a mask.
2- Having pre-designed templates of for example 10 different states of where the arrow could be, and switching those sprites (templates).