tracking ownership of shots

For shooting I create shots via Instantiate(prefab, … , …).
But I need to know which object created the shot.
I have a script attached to the bullet prefab that manages to destroy the shot after a while.

So far I have several ideas:

  1. using SendMessage()… I guess that is not so good on performance
  2. create a class for the shot and instantiate that instead of the prefab and instantiate the prefab in its Start() method… appears a bit complicated
  3. is there another/easier solution?

I am asking cause for me it appears a bit more complicated than it should be. Also I am bit out of practice :wink:

thx in advance

Yep, I think you’re overcomplicating it. :slight_smile: Have a script on the prefab with an owner field. Set that field after you Instantiate the prefab.