- Home /
PrefabUtility.ReplacePrefab overrides changes
Hi,
I want to update a prefab programatically but somehow my changes get overwritten in the scene. When I delete a child transform in my prefabInstance in the scene and then try to update the prefab itself. The changes get reverted when I do this.
GameObject rNewPrefab = PrefabUtility.ReplacePrefab(a_rPrefabInstance, pref, ReplacePrefabOptions.ReplaceNameBased);
If I first create a empty prefab and overwrite the existing one the changes get applied but the prefabconnection gets broken. I've also tried ReplacePrefabOptions.ConnecToPrefab but that did not help either. Does anybodey know what might be causing this?
Thx in advance!
Your answer
Follow this Question
Related Questions
Prefabs won't change? 1 Answer
Suggestions for Prefabs which refer to other Prefabs 0 Answers
Unity Programmatically Link Prefab 2 Answers
Prefab clone not updating 0 Answers