Version: 2020.3
언어: 한국어
public static GameObject SavePrefabAsset (GameObject asset);
public static GameObject SavePrefabAsset (GameObject asset, out bool savedSuccessfully);

파라미터

asset Any GameObject that is part of the Prefab Asset to save.
savedSuccessfully The result of the save action, either successful or unsuccessful. Use this together with the console log to get more insight into the save process.

반환

GameObject The root GameObject of the saved Prefab Asset.

설명

Use this function to save the version of an existing Prefab Asset that exists in memory back to disk.

The given object has to be a GameObject from an existing Prefab Asset. If you have a GameObject from a Prefab instance and get the corresponding object, you will have the corresponding GameObject from the Prefab Asset.

See Also: PrefabUtility.SaveAsPrefabAsset, PrefabUtility.GetCorrespondingObjectFromSource.