Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Generating Skinned Sprite Rig from Script (from Json / Blender Armature)

Discussion in 'Animation' started by nikefootbag, Oct 18, 2022.

  1. nikefootbag

    nikefootbag

    Joined:
    Jun 13, 2017
    Posts:
    28
    I’m trying to generate a Skinned Sprite Rig from script, specifically trying to convert a Blender Armature that’s skinned to a 2D mesh, into a 2D sprite rig in Unity.
    Sprites corresponding to the meshes of the armature are automatically exported from blender as pngs, and a json file keeps track of bounds, pivots, bones, weights etc.
    Basically I want control over Unity’s 2D Skinning editor, and am about to see how it goes making an editor/import script that generates SpriteBones, sets Sprite bindposes and VertexAttributes for all the things.

    Before I embark on this i’m wondering if anyone has been able to do Sprite Skinning from script, i.e. without the Sprite Skinning Editor or other manual handling.
    So regardless of pretext, is it possible to generate the 2D mesh, bones, set the vertex weights etc from script?

    Thanks in advance anyone
     
  2. thornebrandt

    thornebrandt

    Joined:
    Mar 22, 2015
    Posts:
    15
    Did you ever find out anything?