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.


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


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


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


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