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

UI

-

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()

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.