I’m making a little game that duplicates a game object. The problem with this is: if the game object dies, then I can’t make any more of it since the code I’m using makes clones of a game object that actually still exists. This also means that my auto kill system that uses the name of the game object to kill it can’t kill the clones because the clone of an object always says “clone”. I am wondering if it is possible to make a clone of an object before the game starts so that I can set all of my systems to that clone so any other clones will work. Some one please help me!
You could use a Prefab. For example here is some code to call an object that no longer exists using prefabs. To create a prefab drag the game object from the Hierarchy to the project tab and it will create a prefab.
// By making the prefab field Rigidbody you can skip
public Gameobject Object;
//This code makes it so that you set the prefab in the inspector
var objects= Instantiate(object, transform.position, transform.rotation);
//This code creates the new object
In the if statement change it to the event that makes the new game object appear.
In order to set the prefab in the inspector, drag it from the project tab to the empty box in the inspector tab under the script area. You can also look up how to call a prefab on youtube.