Steps to reproduce:
- Create a new 3D URP project
- Install the Asset Transformer Toolkit package (com.unity.industry.toolkit)
- In the Scene view observe Transformer Toolkit overlays appear
- Open any overlay, e.g. Decimate
- Click ~ on the keyboard in the Scene view to open Overlay Menu
- Click on the "Default" dropdown and select it again to reset
- Observe the Console
Actual results: "Failed creating toolbar element from ID "Optimize"." error is thrown when resetting the layout
Expected results: No errors are thrown
Reproducible with versions: 3.3.0 (6000.3.13f1, 6000.4.4f1, 6000.5.0b4, 6000.6.0a3)
Tested on (OS): macOS 26.3
First few lines of warning:
- Failed creating toolbar element from ID "Optimize".
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <c5eeda5e65d44b388e164c6c5cfe0702>:0
at UnityEditor.Overlays.OverlayContainer.GetContainerSection (System.Int32 index) [0x00001] in /Users/bokken/build/output/unity/unity/Editor/Mono/Overlays/OverlayContainer.cs:185