If you call BakeMesh();
and then have scene unloaded so the SpriteShapeController is destroyed I get :
InvalidOperationException: The previously scheduled job SpriteShapeGenerator writes to the Unity.Collections.NativeArray1[Unity.Mathematics.float2] SpriteShapeGenerator.m_ColliderPoints. You must call JobHandle.Complete() on the job SpriteShapeGenerator, before you can deallocate the Unity.Collections.NativeArray
1[Unity.Mathematics.float2] safely.
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckDeallocateAndThrow (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) (at :0)
Unity.Collections.LowLevel.Unsafe.DisposeSentinel.Dispose (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle& safety, Unity.Collections.LowLevel.Unsafe.DisposeSentinel& sentinel) (at :0)
Unity.Collections.NativeArray`1[T].Dispose () (at :0)
UnityEngine.U2D.SpriteShapeController.DisposeInternal () (at Library/PackageCache/com.unity.2d.spriteshape@6.0.1/Runtime/SpriteShapeController.cs:247)
UnityEngine.U2D.SpriteShapeController.OnDisable () (at Library/PackageCache/com.unity.2d.spriteshape@6.0.1/Runtime/SpriteShapeController.cs:267)
Any Idea?