so, I want to make such functionality in my 2d game with unity :
Multi skin character, with similar control and functionality, and with possible different gimmicks (such as crossy road's characters, which some modify game environment and / or have unique death animation, yet THEY CAN ONLY JUMP AROUND a.k.a only cosmetic).
Here's so far what I did :
Make each character into separate gameobjects and prefabs, and then if I need to find a particular script in current active char, I use
Gameobject.Find()
. The problem is, if I need to apply a script, I need to > manually attach it 1 by 1 to each char gameobjects, which I find will create problems if the character number grows.
Is that a good practice? Or there's any more good / best practice on this problem?
P.S.
- I once read
Gameobject.Find()
is slow, so if possible, I want to avoid that. - I use bone-based sprite animation, so, I think, changing just the
Sprite
inSpriteRenderer
component won't work.
Thank you.