Object Pooler public static Dictionary<string, List<GameObject>> pool = new Dictionary<string, List<GameObject>> (); The Pooler contains some "bullets" to be fired. Im activating an Object from the Pooler like this PoolManager.pool [prefabName] .SetActive (true); This activate a bullet The Bullet has an OnTriggerEnter() The problem Both the Player and the Enemies use the same Pool, but how do i tell the Bullet who shot it, so that Enemies dont shot eachother? And how do i format Code on the forum?
Last question first: formatting code is easy if you use the "Insert" button (in the toolbar between the movie filmstrip and the floppy disk). Next: when you activate the bullet object, you will need to also change it in some way — assign it a new Layer or Tag, or get whatever component represents "bulletness" or "which team I'm on" in your game, and tell it which it is.