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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
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.