How can I set my UI object @ the same position than another UI object.
I want to move this red arrow over to the last circle of the Grid Layout.
The arrow and the circles don’t share the same hierarchy of objects, but they share a same canvas.
Using the code below makes me very far off the target.
I would like to have a method that takes 2 Rect Transforms and puts them on each other so that I have to avoid headaches in the future every time I want to move a UI element to another one. Maybe some of you know how to do this?
ArrowSpot.gameObject.SetActive(true);
var pos = UISkill.GetLastSkillAcquired().RectTransform.position;
var rectTransform = (RectTransform)ArrowSpot.transform;
rectTransform.position = pos;