Search Issue Tracker
Won't Fix
Won't Fix in 2023.1.X
Votes
0
Found in
2022.2.4f1
2023.1.0b1
Issue ID
UUM-24812
Regression
No
”A VisualElement must not allocate more than 65535 vertices” error appears when trying to draw a map with "Painter2D"
How to reproduce:
1. Open the user’s attached “WorldMapBug.zip” project
2. Open Menu > Tools > World Map - Too Many Vertices - Bug
3. Observe the Console window
Expected result: No errors
Actual result: Error “A VisualElement must not allocate more than 65535 vertices” appears
Reproducible with: 2022.2.4f1, 2023.1.0b1
Could not test with: 2020.3.44f1, 2021.3.17f1 (“Painter2D” not available)
Reproduced on: macOS 12.4 (Intel)
Note: Error saying "A VisualElement must not allocate more than 65535 vertices" but the map only contains 10500 vertices
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
When using the Painter2D to draw straight lines, more geometry is required than the positions provided to LineTo. The line has a thickness, which requires at least 4 vertices, and each joins and caps between line segments generates extra geometry as well. An easy way to work around this issue is to split the drawing in mulltiple VisualElements (each VisualElement has a 65k vertex limit, but there's no hard limit on the number of VisualElements).
Resolution Note (2023.1.X):
When using the Painter2D to draw straight lines, more geometry is required than the positions provided to LineTo. The line has a thickness, which requires at least 4 vertices, and each joins and caps between line segments generates extra geometry as well. An easy way to work around this issue is to split the drawing in mulltiple VisualElements (each VisualElement has a 65k vertex limit, but there's no hard limit on the number of VisualElements).