Currently I succeed to update a prefab during editor mode (via command line).
I’m making changes to the properties of a gameObject and then use:
EditorUtility.SetDirty(gameObject);
This works as expected.
Now I want to take a container of GameObjects from the prefab, delete the GameObjects and add new ones to the container (Transform).
How can I achieve this?
I tried to use DetachChildren/Destroy for removing the GameObjects - this doesn’t work…
Also I tried to add new GameObject by setting it’s transform parent to the GameObjects container I got - this doesn’t work also.