Hello i am new to Cocos Creator and still learning it. Is there any way for ScrollView content holder to resize if I am setting content to programmatically? I know there is some “Widget” component but I am not sure how it works and if that will even help
You have to use the layout component on the content inside the scrollview.
This does’t work, according to the samples collection the height of content must be calculated.
I have no problems with that. On the content node I have this
And when I add new nodes from prefabs it automatically resizes the scroll view.
You have to make sure that your items have the correct height / width.
I will try this.
Yes ,you are right it’s working.