Search Issue Tracker
Not Reproducible
Votes
2
Found in
4.6.0f1
Issue ID
645235
Regression
No
DivideByZeroException: Division by zero error when changing the Constraint Count for a grid layout
Steps to reproduce :
- create a canvas
- add a new game object
- add the Grid Layout Group component
- parent a few UI elements to the Grid Layout
- change the Constraint Court to 2
- backspace to delete the value and notice the error
DivideByZeroException: Division by zero
UnityEngine.UI.GridLayoutGroup.SetCellsAlongAxis (Int32 axis) (at /Applications/buildAgent/work/d63dfc6385190b60/Extensions/guisystem/guisystem/UI/Core/Layout/GridLayoutGroup.cs:173)
UnityEngine.UI.GridLayoutGroup.SetLayoutVertical () (at /Applications/buildAgent/work/d63dfc6385190b60/Extensions/guisystem/guisystem/UI/Core/Layout/GridLayoutGroup.cs:90)
UnityEngine.UI.LayoutRebuilder.<Rebuild>m__C (UnityEngine.Component e) (at /Applications/buildAgent/work/d63dfc6385190b60/Extensions/guisystem/guisystem/UI/Core/Layout/LayoutRebuilder.cs:50)
UnityEngine.UI.LayoutRebuilder.PerformLayoutControl (UnityEngine.RectTransform rect, UnityEngine.Events.UnityAction`1 action) (at /Applications/buildAgent/work/d63dfc6385190b60/Extensions/guisystem/guisystem/UI/Core/Layout/LayoutRebuilder.cs:80)
UnityEngine.UI.LayoutRebuilder.UnityEngine.UI.ICanvasElement.Rebuild (CanvasUpdate executing) (at /Applications/buildAgent/work/d63dfc6385190b60/Extensions/guisystem/guisystem/UI/Core/Layout/LayoutRebuilder.cs:50)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at /Applications/buildAgent/work/d63dfc6385190b60/Extensions/guisystem/guisystem/UI/Core/CanvasUpdateRegistry.cs:83)
UnityEngine.Canvas:SendWillRenderCanvases()
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Add comment