- Home /
Saving a prefab through code to a folder
Hi,
I'm having quite the problem saving a prefab. Currently I have a blank prefab that contains a character stats script and I'm using a script to modify what is shown in the inspector when that prefab is shown.
What I want to do is have the designer set the stats, level curve, name etc in this blank prefab, then hit the save button I've added in the custom view script and have a new prefab be created in a separate folder.
It almost works but all that is happening is a blank prefab being saved where I specified whilst the "base" prefab I am using to generate new ones retains the new data.
I have a feeling I should be using a separate script to generate these prefabs rather than modifying what is shown in the inspector when that script is shown, but if anyone has any ideas how to help that would be great.
Thanks to anyone who can assist me.