A UID doesn't work. As soon as you leave the layout, the objects are destroyed, so the UID has no meaning. The simplest solution really is separate frames of an animation. Then you just store the frame number, and at the end, create the object and set the frame.