How can i get runtime vertices in 2d animated sprite?

Hey guys,
I have a sprite that was animated by adding bones and geometry with 2D animation version 2.0.0. The sprite is animating great and now i want to add collider to my sprite. But i find that the sprite.vertices are not updated during runtime, which are the initial vertices of the sprite.

How can i get the vertices positions during runtime?

Thank you for your help!

It is not possible with the version of 2D Animation you are using unfortunately.

We will expose this in a future version.

Up, is it now possible?

https://docs.unity3d.com/Packages/com.unity.2d.animation@4.2/manual/SpriteSwapIntro.html I think this is it.

Yes, it is possible now in 3.2.2 for 19.3 and 4.2.4 for 20.1
via SpriteSkin.GetDeformedVertexPositionData()
https://docs.unity3d.com/Packages/com.unity.2d.animation@4.2/api/UnityEngine.U2D.Animation.SpriteSkin.html

but how to start , imean is there any example project please

We do not have any examples of this. Could you share with us where you are currently stuck @stickylab ?

Hey,

Just tried to get vertices with GetDeformedVertexPositionData() in Update method and assign positions to test spheres: spheres moves in another direction than sprite with real vertices. How can I get global vertices positions?

Solved. It seems that GetDeformedVertexPositionData() returns localPositions relative to SpriteSkin’s transform. Perhaps this should be reflected in the documentation