Steps to reproduce:
- Create and open a new 2D URP project
- Create a Tilemap in the Hierarchy
- Open the Tilemap in Tile Palette
- Select "Random Brush"
- Set "Number Of Tiles" to 1
- Set "Tile Set Size X" to -1 (leave other values at 1)
- Observe the Console
Actual results: "OverflowException" is thrown
Expected results: Nothing is thrown in the Console
Reproducible with versions: 6000.0.0f1, 6000.0.76f1, 60000.3.16f1, 6000.4.9f1, 6000.5.0b10, 6000.6.0a5
Tested on (OS): Windows 11 Pro (25H2)
Notes:
- "Number of Tiles" has to be set to >0 to reproduce the issue
- The values are restored to defaults only when the Tile Palette window is opened
- If any two dimensions are negative, the error won't be thrown
- If "Number of Tiles" is >1, NullReferenceException errors will be thrown repeatedly
- There appears to be no validation for negative values on the dimensions