How to save as prefab when a button is pressed

I found this Thread but I did not found a good answer. I would like to create a button and if this button is pressed it should save the 2D created Character (<- ‘Character’ is an Empty GameObject with child Objects attached on it, like ‘Arms’, ‘Legs’, etc. and those have a spriteRenderer on them to select the different sprites) with all of its child objects as a prefab.

I have something like this:

public void SaveCharacterAsPrefab() 
		Transform.Instantiate Character
		int Character
		string prefabPath = "SavedCharacters";
		PrefabUtility.CreatePrefab("Assets/Resources/" + prefabPath + "/" + + ".prefab", Character, ReplacePrefabOptions.ReplaceNameBased);

But (of course) it doesn’t work because I don’t know exactly how to ‘tell the script’ that it should save the Character with all of its child objects and (for example) name/save it as ‘Character 1’.
I don’t know how I can solve it…
Thanks for anyone who wants to help!

Read this, it might help you out.