Both destroy and destroyimmediate doesnt remove the thousand instantiated prefabs from the edit mode hierarchy window or 3D view window.

There are a 1000 nodes in my graph that i load from my csv file and for each one i create a gameobject using the instantiate method with a designated prefab. OnApplicationQuit i call destroy on each one, but after quitting when i return to the edit mode, the created gameobject nodes are still visible and my hierarchy window now has 1000 “Vertex(clone)” objects in it. They aren’t even prefab blue.

Im at my wits end. I tried to save them all into a container and then destroy them one by one. I tried to destroy their parent gameobject. I tried to search through ALL gameobjects and destroy every one with the tag “Vertex” which they all have, but whenever i leave i have a 1000 vertex objects in the hierarchy window and the 3D view.

When i put the cleansing from OnApplicationQuit to Update, everything cleared out. NO NODES IN THE APPLICATION while its running because they all got instantly deleted, but then when i quit the application, I STILL HAVE THE 1000 NODES IN THE APPLICATION!
PLEASE HELP ME!

Please help!

After 2 days of searching, I’ve found this Why aren't my prefab clones destroying on play mode exit? - Questions & Answers - Unity Discussions question with the answer that somehow “start()” is being called after application ends running and he solution
void Start()
{
if (Application.isPlaying)
{
//code
}
}
works, and i no longer have any clones in my hierarchy after application ends running.
This problem also seems to be 10 years old now. Hopefully this helps anyone with similar issue.