Canvas Scaler with Vertical Layout Group and Elements Not Scaling at Runtime?

I am working on an inventory application and I am encountering a strange situation in regards to the scaling of my “product panel objects” when instantiated into the vertical layout group. If I start the application at the reference resolution (320x480) and then scale to any resolution my elements get scaled appropriately, but if I start the application at anything other than the reference resolution first, my objects wont scale inside the vertical layout group correctly. I’ve tried a few setups with the elements but currently they are set to stretch horizontally to fill the object. I’ve tried both min height and preferred height (40px)

: the objects in the vertical layout group with names and eans are generated at runtime with data from an xml file. I have added a blank prefab object in both screens to demonstrate how it should look/fill :

[started at 720x1280]

[started at 320x480 and then scaled to 720x1280]

I seem to have figured it out after many attempts to adjust the layout and rects, the fix was in the code when instantiating the product panels. I simply changed the following line of code:



newProductObject.transform.SetParent(productContentPanelObject.transform, false)

thank you Runevision (of unity) in this post for the lead!

One more life saved here!

3.5 years later… thank you!