In the editor, when you add a PolygonCollider2D to a sprite with a transparent area, the polygon is automatically created.
How can I get automatic polygon creation when creating a sprite dynamically in the script code?
I will be grateful for your help!
Nobody has a solution?
You need to manually pass in the coordinates of the desired point,the current data is generated with the inspector plugin
Does anyone have a code example?