Search Issue Tracker
By Design
Votes
0
Found in [Package]
5.0.1
Issue ID
1264007
Regression
No
Error is thrown when calling GeometryCollider.Bake for Game Object with Sprite Shape Controller and Polygon Collider 2D
How to reproduce:
1. Open attached project "case1264007.zip" and Scene "SampleScene"
2. Enter Play Mode
3. Observe the "IndexOutOfRangeException" error in the Console window
Expected result: The error does not appear
Actual result: "IndexOutOfRangeException" error appears
Reproducible with: 2019.4.8f1, 2020.1.2f1, 2020.2.0a21
Could not test with: 2018.4.26f1 (Editor throws errors when downgrading)
Reproducible with package versions: 3.0.2, 5.0.1
Could not test with package versions: 1.0.10-preview.3, 3.0.1 (Editor throws errors when downgrading)
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
- Skinned Mesh Renderer with multiple Animator Components does not render when "Optimize Game Objects" is enabled
- [iOS]Certain characters are not displayed when using iOS devices with 18 OS and newer
- Trees do not render in 'Unity Terrain - URP Demo Scene'
- Silent crash when clicking in Scene View in a specific project
- The Player renders black on a Quest headset when MSAA, Post Processing, and Spacewarm depth submission are enabled
Resolution Note:
GeometryCollider is provided in Extras to bake Collider with higher detail based on the Renderer Mesh.
It's general use is to bake through SpriteShape -> Bake Geometry Collider.
SpriteShape Geometry by design are generated on the runtime based on the minimal data required (hence very minimal build size for SpriteShape). They are generated as soon as they become visible. You can also bake the geometry in Editor time using the Geometry Cache feature which avoids generation on runtime. Also SpriteShape Geometry generates deterministic output geometry for a given set of inputs.