So, when you need an object destroyed at an exact point in a coroutine, but you can't do it from within that coroutine, what do you do? If you're me, you make a new C# script called cloneKiller, and when you instantiate the prefab you also add the script to the clone with
ck = clone.AddComponent<cloneKiller>();
cloneKiller contains a single function, called KillMe:
public void KillMe()
and in the middle of the coroutine, I simply call
I know, that's absolutely ridiculous, and I should be ashamed of myself, but it works. . . actually I'm going to go ahead and make that statement the official motto of this blog.