How can I select a UI element with a raycast from another UI element?

I have buttons arranged in a circle and a dial in the middle that rotates and points outward. I want to raycast from the dial to select a button. I don’t know what the best way to cast rays between UI elements is, though.

I know Graphics.Raycast is used for something similar to this, but I’m not sure if it’s what I’m looking for here or not. Can anyone shed some light on raycasts between UI elements?

I’m pretty sure the Raycast for UI is only from Camera to UI. If you only have buttons around a dial, you could set the rotation of the dial specific to said button. i.e. if dial rotation is >45 && <89 button 3 IsSelected.

I ended up doing something similar to what WideEyeNow recommended for now (the code below). I would still love to know, though, if there’s any solution for shooting rays inside of a canvas.

private Button GetPointedAt( ) {
	float r = transform.eulerAngles.z;
	float bracket = Mathf.Round(r / 45f);
	if (bracket == 8) {
		bracket = 0;

	if (bracket < 7) {
		return null;
	} else {
		return buttons [(int)bracket];