0
\$\begingroup\$

I'm trying to animate a platform front and back.

Because, when my character will be on it, it want the front of the platform to be in front of the character.

Here is what I have so far :

An image is better than a thousand words

The thing is, now I want to animate it, and the little green part that you can see on the left is moving and have to come in front of my character. BUT, when the green part is on the back then my character has to be in front of it.

The order is this :

backpart : order in layer : 9
character : order in layer : 10 
frontpart : order in layer : 11 

And, the backpart and frontart are together in a prefab like this :

- backpart 
   - frontpart (son of backpart)

I have no problem to animate the backpart but I can't find any way to animate the frontpart WITH the backpart.

In the animation window I can't put a second row of sprite and I don't know the other way so I'm kinda stuck.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

I actually found how to do it by myself.

On the animation window, click on "Add property" > the name of the child object (in my case, frontpart) > "SpriteRenderer" > "Sprite".

And voilà, a new row appears and you can put your image on it!

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .