Search Unity

Sprite Skin Entity (issue to access sprite of a 2d skin)

Discussion in '2D' started by Bakudan, Apr 25, 2019.

  1. Bakudan

    Bakudan

    Joined:
    Mar 29, 2015
    Posts:
    16
    Hello,
    I was using Spine to use my animations but since Unity got a new skin/rin system with weight i had to give it a try.

    I am using the Skin/Rig components, which automatically create a hierarchy with bones and the separated sprites.
    The main issue is that i need to re-order in my sorting layer, sprites, so they align correctly in a 2D Top/Down game.

    But every time i try to add some script component in this Rig/Skin hierarchy i got errors like below :


    Its the same if i try to add other scripts or collider, since i got those "sprite skin entity" in my rigged component i got errors, any clue ?

    The only solution i see is to add the script at a parent empty, make it loop trough children if they have a sprite renderer and affect their layers order, but i don't see why i can't add it directly in the correct sprite renderer without errors messages.
     
  2. LiterallyJeff

    LiterallyJeff

    Joined:
    Jan 21, 2015
    Posts:
    2,807
    That warning is saying you have two version of "Sorting_Order" applied to the one gameobject, is that so?

    Also, what exactly is the function of your Sorting_Order script? It seems like something that might be able to be accomplished with a SortingGroup at the root perhaps?

    I ask these questions because it's hard to tell where the actual problem is, and it seems like you've got some custom sorting solution going on which may be working against you.
     
  3. Bakudan

    Bakudan

    Joined:
    Mar 29, 2015
    Posts:
    16
    The problem is as i said not relate of this script in particular but anything i'm adding in my skin/prefab since i add the Unity Skin/Rig.

    Let say i just click "add an empty script component" in this,as below, this is what i get in return :


    Its just a tree, composed of a sprite of 2part where i add the Unity Skin feature and some weights and bones, nothing fancy.
    But since i did this as you can see, everything i try to add on the sprites elements of my skin, just gets me a tons of errors different everytime.
    (i should precise that the Tree Skin prefab is nested into another prefab which is just an Empty but it shouldn't be an issue.
     
  4. Bakudan

    Bakudan

    Joined:
    Mar 29, 2015
    Posts:
    16
    And now i've just updated the png of my tile palette without changing it size, just changing some colors, and i get this in unity, a broken screen...

    Even if i delete my Tilemaps and Palettes, creating new palette result in the same bug issue, changing the png by another too, project file dead....

    Is there any 2d feature working in the 2019.1 release ?
     
    Last edited: Apr 26, 2019