I have investigated and found what’s wrong: Y coordinates of items added to the scrollView aren’t correct on the first displayed frame!
(It is a vertical scrollView - only ‘Vertical Scroll’ is checked - content layout type is ‘Vertical’ and Resize Mode is ‘Container’)
I have displayed Y coordinates of items added to the scrollView, in lateUdpate() method and on the first frame after the items was added, the Y coordinates of all items are the same…
(for information, this Y coordinate correspond to scrollView.content.convertToWorldSpaceAR(scrollView.content.getPositionY( ) ).y )
On the second call to lateUpdate() after the items was added to the scrollView, the Y coordinates are fine.
Also, something I reported previously and which is still happening: if added items are buttons, they are ‘clickable’ even when they are not visible (they are in a content area part which is outside visible part of the scrollView)
Something else I wanted to report: it seems that under some circumstances the behaviour of scrollToTop (or scrollToPercentVertical with 1.0) is completely wrong…
This is specially true when content height is lower than scrollView height, and content.y > scrollView.node.y : if you call scrollToTop under those conditions, then it all goes wrong (content.y is incremented instead of beeing decremented)
I’m working around this problem by setting content.y=0 instead of calling scrollToTop…is it bad?
(I set content, view and scrollView Y anchor points to 1.0, so when Y=0 it means top of scrollView)