The scrollrect viewport breaks when changing scene

I have a scrollRect set up with some text as content. It’s working fine when I just play the scene. The Viewport looks like this in the inspector.

The problem is when I load this scene from another scene, the viewport behaves weirdly. Here is what it looks like in the Inspector when loaded from other scene:

As you can see the Rect Transform component values change (the anchoring preset and the delta size). I’m assuming the reason the content disappears is because of this, but I’m not sure.

If I change some of the viewport rect transform values (position for instance) when the game is paused it resets back to normal when I resume. It doesn’t work if I do the same in the script, though.

Unity version: 5.4.1f1 Personal

Any help is appreciated, it’s driving me crazy. Thanks in advance and sorry for any english mistakes.

I had a similar issue and I’ve managed to find a workaround.

In my case, the “Visibility” property of the horizontal and vertical scrollbars in the ScrollRect were both set to “Auto Hide And Expand Viewport”. By setting them to either “Permanent” or “Auto Hide”, the ScrollRect wasn’t messed up anymore when changing scenes.

Not ideal, but it might be good enough depending on the situation. I tested this on Unity version 5.5.0 f3.

The same problem and the same solution. Hope this is Unity bug. Reproduced in Unity 2017.

The same in Unity 2019.3.10f1