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
- Crash on "StoredGraphicsBuffer::GetGfxBufferID" when activating VFX via extention of Activation Track in Timeline window
- [Linux] Stack trace file path and line number information is missing when IL2CPP Stacktrace Information is set to "Method Name, File Name, and Line Number"
- Warnings due to obsolete Object.FindObjectsByType<T> usage and [SerializeReference] are logged when opening the Netcode for Entities setup scene
- Non-standard pointers cannot change Inspector values with arrow controls when crossing Inspector area
- No longer able to change the Toggle or Slider GameObjects' Target Graphic value and a NullReferenceException is thrown when the Target Graphic value is set to None at any point
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).