I want to destroy an object when the health goes down below 0. Now my problem is I do not have a unique id so if I destroy the object by its tag it destroys all the objects with that tag as expected. I’m trying to use GUID to generate a unique ID, but am running into difficulties.
Firstly does GUID have to be a string?
public int id;
id = System.Guid.NewGuid();
Secondly how would I reference the object with that specific id to destroy it?