Search Issue Tracker

Fixed in 2021.2.X

Votes

0

Found in

2021.2.0a6

2021.2.0a16

Issue ID

1334553

Regression

No

[2D] ArgumentOutOfRangeException thrown on adding the Tilings Rules under Rule Tile after Reset it in the Inspector

2D

-

ArgumentOutOfRangeException is thrown continuously when Rule Tile is Reset and adding Tiling Rules in the List from Inspector, Refer to attached video.

Steps to repro:
1. Create a new project with a 2D Template
2. Window > Package Manager > 2D Tilemap Extras > Install
3. Project > Create > 2D > Tiles > Rule, Hexagonal, Isometric Tile
4. Inspector > Tiling Rules > Add
5. Burger button > Reset
6. Try to add again Tiling Rules

Actual Result:
ArgumentOutOfRangeException is thrown on adding Tiling Rules under Rule Tile in Inspector after resetting the existed list

Expected Result:
Tiling Rules are added gracefully in the List

Note: Rule, Isometric, Hexagonal Tiles are introduced in the Unity 2021.2.0a6

Reproducible in:
2021.2.0a16, 2021.2.0a6

Environment:
Occurring on Windows 10 & macOS 10.15.

Stack trace:
ArgumentOutOfRangeException: Index must be within the bounds of the List.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.Collections.Generic.List`1[T].Insert (System.Int32 index, T item) (at <695d1cc93cca45069c528c15c9fdd749>:0)
UnityEditor.RuleTileEditor.OnAddElement (System.Object obj) (at Library/PackageCache/com.unity.2d.tilemap.extras@2.0.0/Editor/Tiles/RuleTile/RuleTileEditor.cs:276)
UnityEditor.RuleTileEditor.OnAddDropdownElement (UnityEngine.Rect rect, UnityEditorInternal.ReorderableList list) (at Library/PackageCache/com.unity.2d.tilemap.extras@2.0.0/Editor/Tiles/RuleTile/RuleTileEditor.cs:304)
UnityEditorInternal.ReorderableList+Defaults.DrawFooter (UnityEngine.Rect rect, UnityEditorInternal.ReorderableList list) (at <03609da0ab2f44f1b4469aa7e2ed6dad>:0)
UnityEditorInternal.ReorderableList.DoListFooter (UnityEngine.Rect footerRect) (at <03609da0ab2f44f1b4469aa7e2ed6dad>:0)
UnityEditorInternal.ReorderableList.DoLayoutList () (at <03609da0ab2f44f1b4469aa7e2ed6dad>:0)
UnityEditor.RuleTileEditor.OnInspectorGUI () (at Library/PackageCache/com.unity.2d.tilemap.extras@2.0.0/Editor/Tiles/RuleTile/RuleTileEditor.cs:404)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <e6e1a2d577f64f5ca07dab289b4fed14>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

  1. Resolution Note (fix version 2021.2):

    Fix for this issue available on Unity 2021.2.0b14 and above

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.