Search Issue Tracker
Fixed in 2018.2.X
Fixed in 2017.3.X, 2017.4.X, 2018.1.X
Votes
0
Found in
2017.3.0f1
2017.3.0f3
Issue ID
988706
Regression
Yes
The AspectRatioFitter with envelope parent mode doesn't control the RectTransform at the first frame after changing the scene
Reproduction steps:
1. Download project "AspectRatioFitterBug.zip" and open in Unity
2. Open Main scene
3. Enable Play mode
Expected: scene changes smoothly
Actual: scene experiences a glitch (appears at the end of the GIF)
Reproduced on: 2017.3.0f1; 2017.3.0p4; 2018.1.0b5; 2018.2.0a1
Not reproduced on: 2017.2.1p3; 2017.3.0a1; 2017.3.0b11
Regression introduced: 2017.3.0f1
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Script causes Console error "Reading pixels out of bounds of the current active render texture" when entering the Play mode on a HDRP project
- Adding a git url package shows it in the Unity Registry section of Package Manager
- Mesh Renderer is frozen when there are duplicate Static GameObjects
- ScalableBufferManager.widthScaleFactor always returns 1 when using DirectX 11
- [iOS] Camera loses focus when the device is near an object on some iOS devices
andersemil
Sep 06, 2018 08:06
A quick workaround for this issue on earlier Unity version is to do this in the first frame, which forces the component to update:
foreach (var arf in gameObject.GetComponentsInChildren<AspectRatioFitter> ()) {
var restore = arf.aspectRatio;
arf.aspectRatio = arf.aspectRatio*1.001f;
arf.aspectRatio = restore;
}
chyrho
Apr 19, 2018 04:34
This particular issue appears to be fixed in 2017.3.1p4. However, there is still another closely related one:
When SetActive(true) is called on a previously disabled canvas during a Update() or LateUpdate() event from another script, the RectTransform is not recalculated until next frame. The symptom is the same as this one (incorrect RectTransform dimension for one frame).