How to use ReplaceWithPrefab.cs¶
Sources¶
Original source of script unknown. Found by Jason Weimann
Steps:¶
-
Go to Tools at the top of Unity and click on Replace With Prefab, a new window will appear.
-
Select objects in a scene using the Hierarchy tab.
-
In the ReplaceWithPrefab window, select a prefab in the Prefab field.
-
Click the Replace button to replace selected objects with the prefab chosen in the Prefab field.
Note: When you replace an object, the new .prefab will have all its variables (except for its transform values) reset to its parent.