How can i use skinning editor to Auto Gemotry spritesheet by code not grahic?

i want to use skinning editor to reduce the transparent part of spritesheet, by using the auto geometry item, and generate For All visible sprite, but i got much spritesheet in my project, so i wonder how can i do this by code?

![8204103–1070493–Z7V}8ZXME]HOTGL8BY9{25.png|2329x951

@luoweihong is it a frame-by-frame flip book animation or is a skinned character that needs to handle deformation?

I don’t see any bones in your screenshot so I’m assuming it’s frame-by-frame animation. In that case your mesh is automatically generated on import and the mesh type is set to “Tight” by default to minimise overdraw. You could also define your own custom outline in the Custom Outline editor.

it is a frame by frame aniamtion, what i want is reduce overdraw, i think maybe i can use skinning editor to do this,i dont need to generate bone for the png, I just want the mesh tighter than the auto setting by default setting

because i have ten thousand pngs, so i wonder how can i do this by code

Just to clarify, the mesh you see in the Skinning Editor is used only when you skin your Sprite. By default, your Sprites will use the auto-generated tight mesh. You can preview your Sprite meshes in Scene view if you change the “Draw Mode” to Shaded Wireframe or Wireframe as seen in this screenshot:

We currently don’t have any official APIs to automate outline generation from code, but if you have means to generate your own outline you could do so using the AssetPostprocessor as described here with the ISpriteOutlineDataProvider.

got it…but i think if there have an official apis to generate outline in editor will be great, or maybe overdraw does not a problem with performance?