- Home /
Access a specific element in GridLayoutGroup by script ?
Hi guys, I'd like to access the position of a specific element (in this case an image) display by Grid Layout Group. Any way to do this ??
Something in the spirit of : gridlayoutgroup.cellnumber3.position
Thank all ! :)
Answer by hexagonius · Jan 30, 2016 at 07:34 AM
There is no such method out of the box. I think you can calculate what is where by comparing y values of the elements.if they're all the same type you can be sure that each row has the same value.
If you need more control you'd have to write your own gridlayoutgroup.
Your answer
Follow this Question
Related Questions
IndexOutOfRange Issue 1 Answer
How to create a 2D grid based array with passable/impassable grids for movement ? 1 Answer
How do i change a sprite when another gameobject with the same prefab is colliding / is near 1 Answer
How not to add an object to an array/list if there's already an identical one. 2 Answers
creating a 2d array for grid (Not been asked i swear) 1 Answer