That right there...the engine is built on a very shoddy base that creates, populates, saves and destroys and restarts the whole level every frame when in edit mode
wow...
You sir, have found one of the most complicated ways, I can imagine to do this...