I'm trying to move one of my UI gameobject (that has a render mode of screen space) to the position of another UI gameobject. I'm using the DoTween asset to help with the movement. I've currently tried:
myUIGameObject.transform.DOMove(myDestinationOnUI.transform.position, 1f)
and also
myUIGameObject.DOAnchorPos(myDestinationOnUI.GetComponent<RectTransform>().anchoredPosition, 1f)
both results yielded unwanted result in that the latter code's final position wasn't where the destination should've bee and the former code would sort of work but instead it seems like it just goes to the world space instead of the canvas spot. Not too sure where to go from here and any suggestions will be appreciated!
Sincerely,