Thanks for answering my question few days ago.
Now I want the player, at some point, to equip a flashlight and the flashlight can be seen in his hand while walking. So I think I have to add a new walking(with flashlight) animation other than the default walk and run animations in the Player Standard 2d animation script.
How can I do this? Thanks!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
The exact method depends on your character's animation engine, but both 2D options involve first preparing an alternative set of idle/walk/run animations (as required) and placing them in the Animator alongside your "regular" animations.
If your character uses the "Sprites Unity" animation engine, it's then a case of using Character: Animate Actions, with the Set Standard method, to replace the standard animation names to your new set (i.e. "Idle" now becomse "TorchIdle", etc).
If they instead use "Sprites Unity Complex", you can create a Bool parameter in your Animator that causes a transition to this new set of animations, and then use the Character: Animate Action's Change Parameter Value to make that Bool parameter True.