Saving back changed/new GameObject as a NEW Prefab in RUNTIME?

I’ve checked the forums and there aren’t any particularly satisfactory threads on it.

Can this be done in runtime? Saving a new or changed GO to a particular Asset path as a NEW prefab at RUNTIME?

Anyone posted code on this?

Is there any particular Asset on the Asset store to help with this?

Any pointers gratefully received. :wink:

Kind of. It can be done at editor runtime (as in during play mode in the editor), but not in a built version of the game. To do this you can use UnityEditor.PrefabUtility.CreatePrefabFromFile.

If you need it to work at runtime, you’re better off saving your changes to another type of file. You can then load that data and apply all necessary variables.

Do you mind if I ask what it’s for? I can get a better sense of what you might need with a more in-depth explanation of your scenario.

Rpg save game of items, players, stats, scene statuses etc.