Matching RectTransform positions from different canvases

I’m having an issue where I can no longer use this line:

RectTransform1.position = RectTransform2.position;

When I use that line, the RectTransform does not actually move on the screen. It stays in the same spot.

I tested with setting RectTransform.anchoredPosition, and that does move it, but I’m not sure how to convert RectTransform1.anchoredPosition to be at RectTransform2.position. These RectTransforms will be in two separate Overlay canvases.

Any ideas?

(The purpose of this code is to move a selection cursor to specific points in the UI that are currently selected.)

After a couple days of testing and trying to repro the bug, I finally discovered that the “Aspect Ratio Fitter” component is currently bugged out and preventing RectTransform being moved by anything other than its anchoredPosition.

Aspect Ratio Fitter
https://docs.unity3d.com/Manual/script-AspectRatioFitter.html

Removing it from the Canvas object works perfectly, but it’s required that my game have a specific aspect ratio… I guess I’ll just report it and pray to the Unity gods that it gets fixed before I have to release.