Saving runtime created avatar

Hi everyone!

Need help with avatar after AvatarBuilder.BuildHumanAvatar. Avatar is valid and added to prefab, as showed at picture.
But! I cant apply override to prefab. Unity says “A reference to an object in the scene cannot be applied to the Prefab asset”, second picture.

PrefabUtility.SaveAsPrefabAssetAndConnect does not save the avatar to prefab. I am in searching the solution.

Is there any way to save/apply avatar to the prefab?




Found out!

Saving by “AssetDatabase.CreateAsset” perfectly work!