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
- Profiler - Taking you to the wrong section when using 'show'
- Draw Renderers custom pass doesn't work with SSGI
- WebCamTexture does not set the requested resolution when used in WebGL
- Editor default Stylesheet/Matching Selector buttons in Debugger don't do anything
- Graphics.DrawMeshNow stops rendering Render Texture after a few frames when viewed in the Player
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.