I have about a dozen different Scenes in my project, with same scripts working correctly everywhere, except in this one particular Scene. There, adding components (box colliders in this case) to a prefab during runtime actually overrides the original prefab after Play-mode has ended, resulting in a prefab with half-a-dozen box colliders where there was none before. When these added components should be destroyed in a script, I get an error message ”Destroying assets is not permitted to avoid data loss.” This also applies to any instantiated clones that I make within the scene.
Also, in this Scene, it doesn’t allow to change the parenting of objects, giving me error ”Setting the parent of a transform which resides in a prefab is disabled to prevent data corruption.”
I want to emphasize that these same scripts and events work in every other scene, just not in this one. I’m wondering if this is a bug or have I accidently changed some Scene-specific setting from preferences or something. I’m hoping that is the case, but for the life of me I haven’t been able to find the answer from within Unity or from Google. Help is much appreciated!