I have a base sprite with a lot of animations for my game. In my game there are a TON of weapons as well. It sounds a little crazy to have to individually animate into my animation my character holding each different weapon, is there a way to almost sort of “spawn” each weapon to a certain point in the frame (in the sprites hand in this case)
Does this make sense? How do people accomplish this…
Sure. You could have each the item class have a variable that holds the prefab to be used for the “world item” (the gameobejct representing the equipped item), maybe as a GameObject or, if serialization is an issue, as a string that you use with Resources.Load to load the prefab when it needs to be instantiated. You could also have a variable that holds the offset of the world item as a Vector2/3, so you can put the world item at the right localPosition (it will be a child of the character or one of the character’s body parts, like a hand). When you equip an item, you instantiate the prefab, make it a child of the right body part, and set it’s transform.localPosition to it’s parent’s transform.position plus the offset Vector.