Checking which enemy shot the bullet.

Hello guys,

I have a enemy that shoots a bullet, how can I store the transform of the enemy inside the BULLET script.
I want to use it to show the location of the enemy when the bullet hits the player. The damage indicator triggers when the bullet hits the player so I need the transform from the enemy inside the bullet script.
The tricky part is there are more then 1 enemy shooting these bullets, I cant figure out how to store the transform of them separately. Any ideas?

Either store a collection of references to the active projectiles or store a reference to your Enemy on the projectile.


If you show us your Bullet/ Enemy code we can show you specifically how to adjust it.