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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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).