ReplacePrefabOptions Manual     Reference     Scripting  
Scripting > Editor Enumerations > ReplacePrefabOptions
ReplacePrefabOptions Enumeration

Flags for the EditorUtility.ReplacePrefab function.

Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.

Values
Default

Replaces prefabs by matching pre-existing connections to the prefab.

ConnectToPrefab

Connects the passed objects to the prefab after uploading the prefab.

ReplaceNameBased

Replaces the prefab using name based lookup in the transform hierarchy.

UseLastUploadedPrefabRoot

Automatically finds the prefab instance root of the provided game object and uses that as the root for the replaced prefab instead