Search Unity

Animate sorting group?

Discussion in 'Animation' started by menderbug, May 13, 2020.

  1. menderbug

    menderbug

    Joined:
    May 14, 2018
    Posts:
    26
    It looks like Unity's animation system got some special treatment for a SpriteRenderer's Sorting Order (which it normally couldn't animate since it's an integer). However, as far as I can tell, the Sorting Group component didn't get the same treatment, so it's not possible to animate the order of those. Could this be considered for a future feature?

    Do people have any decent workarounds? I guess I could create a script and call it from an event, but in my specific case I only need to change the value for the relative ordering of one SpriteRenderer and one SortingGroup, so I'm just going to animate the SpriteRenderer's order (even though that doesn't make as much physical sense, since it's conceptually a stationary object).
     
    screene and kyuskoj like this.
  2. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    781
    I still stuck at this issue too. my sprite animation sort order is always animated sorting order to 0 I don't know why
     
  3. therobby3

    therobby3

    Joined:
    Jan 30, 2019
    Posts:
    131
    Also still having this problem today. Can't animate a SortingGroup's "Order In Layer" property. =/
     
  4. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    323
    I've just run into the same problem today. SortingGroup's "Order In Layer" property is not animable.