Spawn gameobject in scene and save it in editor WITHOUT doing it through play.

how do i spawn a gameobject that saves itself in the editor without doing it through play.

First and foremost. Can’t you just drag a prefab or do a create new GameObject, which is by far the simplest way? If not, you will probably need to create a custom Editor/window depending on what you want.

Yet, this is all used for working optimization. If you just want to add a gameObject to the scene just do Create/GameObject/Whatever.