So I’m making a game with enemies where when you hit one, the Spawn Manager will delete it. But the problem is it always deletes the last one spawned first, no matter which one I hit. Someone recommended giving them IDs, but I can’t figure out how to do that.
I mean at runtime, individual instances of Unity objects are already uniquely identifiable. You can tell if two instances are the same with the overloaded ==
operator Unity provides.
This sounds like a logical error, or some other misunderstanding with how Unity operates. I think we’d need to see the code in question to give better advice. Its not a good use of your time to try and work in a solution when you don’t know what the actual root problem is.