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
Comments (2)
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
- TMP's Input Field caret disappears when its width is set to 1
- "NullReferenceException: Object reference not set to an instance of an object" error is thrown when attempting to remove a binding in the UIBuilder for a UxmlObjectReference
- Missing script error when clicking “script” link in Cave scene’s Water Sample Description
- [VFX Graph] Set Position Shape Gizmo isn't refreshed after shaper switch
- NullReferenceException is thrown when trying to access volumeStack from the HDCamera class
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).