How to save the player?

hey guys ive searched all day long and i got nothing… my problem is: i design a character creation system. look at —> - YouTube

and i dont know how the hell make something like a prefab of the creation… i was reading, and reading, but the most closest thing that i found was in C#, and i barelly known C# :frowning:

this is my code(useless at the moment):

var CharToPrefab: GameObject;
var CharToName: GameObject;
var CharName: String;
var IsDoneP: GameObject;
var Proceed: boolean = false;
var IsSpirit: boolean = false;
 
function Update(){
Proceed = IsDoneP.GetComponent(DeactiveBlockScreen).PrefabIsDone;
CreatePrefab();
CharName = CharToName.GetComponent(TextName).namefield;
 
}
 
function CreatePrefab(){
    if(Proceed==true&&IsSpirit==true){
       PrefabUtility.CreatePrefab("Assets/PlayerPrefab/SPIRIT/"+CharName+".prefab");
 
    }
}

So if you watched the video, when you click on the green “Y” button: the window closes and the PROCEED bool become TRUE and so the “prefab creation process” begins… but here is where im stuck…

can anyone help me with this? how to save the player in a prefab, or an asset, with its own materials and stuff(something like: copy the materials and the models, and the hierachy of the object, and make a copy of that so when i want to create another character if i modify these materials, like colors and stuff, the old character will keep their own info) i dont know if i make it clear… maybe my english is not so good… ahaha, apoligize for that…

PD: if u are wondering “what the hell is that IsSpirit thing is?” A: that is because i will do another GUI for a “biological creature” creation, so in this case IsSpirit, you got it? :smiley:

I’m not sure you can make a prefab from the player. That may just be an editor thing only.
But, you could take the gameobject created from the various options, pass it through the serializer and save it as a file or as a string in player prefs. heureka.dk