Hello, I am trying to destroy an object instantiated from a prefab, when I use the destroy() function it deletes that object but then it also deletes the prefab that is attached to a slot in the inspector and shows it as missing, is there anyway I could delete that object without destroying the attached prefab?
You should get a reference to the prefab in your script, then unparent it before destroying it.
public GameObject attachedPrefab;
attachedPrefab.transform.parent = null;
Destroy(objectToDestroy);