- Home /
Can't add Transform to an Array on Prefab.
Getting this error when trying to add transforms to my array list on a prefab-
Setting the parent of a transform which resides in a prefab is disabled to prevent data corruption. UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32)
Ok WTH ! and how do I get around this problem. Hopefully this is not a "can't be fixed" problem or that renders my waypoint system useless, not to mention a wasted afternoons work ???
:(
Comment
Answer by UNZoOM · Apr 03, 2015 at 05:05 PM
You need to instantiate the prefab first and then assign parent to that instance of the prefab.
And if this is editor-time prefab child hierarchy editing, then you need to work through PrefabUtility and instantiate, modify, then update the prefab.