Create prefab without creating instance within scene?

Hey all,

Quick and simple question. I’m working on a prefab management tool and I was wondering if there is a way to instantiate GameObjects without necessarily creating them within the current scene. Currently I am instantiating the gameobjects in the scene, then saving them as a prefab before destroying the instance within the scene, but I was curious if there is a way to do this without having that step present. I’m assuming not but I figured I would ask

Yes you can just select “prefab” from the asset menu.

Sorry I should have been more clear, I am looking to do this from within an editor script

Well there’s this but it’s marked obsolete. I’m not sure what the replacement is.