- Home /
Question by
chetanisinanand · Feb 11, 2017 at 10:39 AM ·
unity 5uicanvasrecttransform
Moving RectTransform over another RectTransform under GridLayout
I have this setup
- Canvas
HoverElement
- GridLayoutGroupView
Element1
Element2
Element3
Element4
I've a method that should move HoverElement over each element
public void MoveObject(int toIndex){
//Logic : translate HoverElement over Element[toIndex] of GridLayoutGroupView
}
Please help me with the logic because the RectTransform does not work like transform, even if I set the posX, posY of HoverElement to exactly same as Element[toIndex] it doesn't move to the exact same position because of anchoredPosition (i believe)
Comment