Bullet holes to become child of object they are on

Hi,

I am currently coding an FPS game in Unity. When you shoot, it shoots a raycast from the center of the screen to a collider, deals damage and makes a bullet hole graphic to the collider. The only problem is that when an animation is played, it makes it stay in the same spot, while the character (for example) falls over. How do I parent the bullet hole graphic to the enemy? Thanks for any help!

You need to attach the bullet hole to the right part of the enemy’s armature. I’m not sure what the best approach would be…maybe just iterating over all of the enemy’s bones and picking the closest one?

Note that this could still look wrong – the bullet hole will be fixed in place relative to a single bone, when the mesh might be getting deformed by several bones.