Any way to copy and paste GameObjects programatically?

It would be a useful feature. it’s impossible to copy objects to a prefab without using an Editor Script so you can’t copy an object to a prefab without using a menu option.

Perhaps it’s possible to make a “copy to prefab/paste from prefab” function in an Editor Script and access it from a Normal Script?

I dont think it’s possible to edit the objects in the Selection of hierarchy, which is held in an array somewhere, and i didnt see any selection copy/paste options in reference.

Is there any way to store GameObjects to a kind of memory and paste them into the game elsewhere?

You mean like a deep copy? What specifically are you trying to accomplish here?

From Object.Instantiate

This is essentially the same as using duplicate command (cmd-d) in Unity and then moving the object to the given location