SOLVED (see the post below) but I don’t like the solution, I think Unity engine should doing the scaling automatically whitout hardcading it. So is that a bug ???
Hi,
I have a scroll view whose Elements are prefabs.
The prefab is a simple gameobject containing 2 UI Buttons.
I add them on the Content object (child of the viewport) with a vertical layout.
This is OK.
If launch the game in editor and prompt my panel containing the scroll view, the latter is well populated withs my prefabs instanciation.
Then I resize the window and the panel and the scroll view elements (prefabs instantiation) are correctly resized as well. Which is logic i have a Canvas Scaler : Scale with screen size activated.
But the issue is when I close my panel and reopen it : The prefabs are instantiate again but without taking the care of the proper scaling !
here is a video of the issue :
Thx for any help about this. ![]()