- Home /
Swapping between many similar sprite animations in 4.3
So, I finally ran into a question that I can't find being answered anywhere else.
I'm trying to let the player create a character and use them in my sidescroller. To accomplish this, I've created separate spritesheets for each shirt/mouth/nose etc. During gameplay, all of the parts will be overlayed and animated together to create the character.
The problem is, even though the animations for each sprite are the same (one walk cycle and a jump frame), I can't find an easy way to use the same animation with a different sprite. I have the walk cycle all set up, and I can copy the animation and put in the frames of another sprite sheet, but what I'd really like to do is be able to change in script which sprite-sheet the animation uses. Seeing as I can't figure out how to do that, I've come up with two alternate solutions, neither of which I'm fond of:
Create a folder for each possible body part, and copy and paste the animator, walk animation, and jump animation, for each sprite sheet. Then, jut change which animator the player object is using for each body part. This seems like a humongous waste of time, space, and energy. But it is the most direct and simplistic.
Ignore all of 4.3's nice animation features and simply import every single spritesheet into an array in the player's script, and handle animation directly from in there. I'm not 100% if I can access the sprites of a spritesheet, or if I'll have to import each sprite individually, but I do have experience with animating through scripts (t-thanks Game Maker), but, again, seems like a lot of work for something that should be so simple.
Which of these is the better solution, or, preferably, what other alternatives are there?
Thanks in advance, all responses appreciated.
Answer by Jodio · Feb 01, 2021 at 10:43 AM
I have the same problem I dont think there is an easy solution for this
Your answer
![](https://koobas.hobune.stream/wayback/20220613130622im_/https://answers.unity.com/themes/thub/images/avi.jpg)