PrefabUtility.ConnectGameObjectToPrefab

Switch to Manual
public static GameObject ConnectGameObjectToPrefab (GameObject go, GameObject sourcePrefab);

Description

Connects the source prefab to the game object.