I have a collection of different enemies that I save as Prefabs with default AI settings. I drag them into the game world and apply changes to the AI as necessary.

enter image description here

Every now and then for some reason I happen to click on Apply Prefab at the top right of the screen. That obviously messes up my Prefab and depending on the settings that I changed also messes up ALL the other bots in the game world.

Yes, I shouldn't be pressing that button, but is there any way to set the Prefab to read-only not to accidentally override settings?

  • 1
    \$\begingroup\$ Have you tried setting the prefab files themselves to read only in your file system? \$\endgroup\$
    – DMGregory
    Oct 28, 2018 at 12:21
  • \$\begingroup\$ It doesn't mess up with anything, this is how the prefab system is supposed to work. Applied changes are reflected to all the instances of that prefab. More info: docs.unity3d.com/Manual/Prefabs.html \$\endgroup\$ Oct 28, 2018 at 14:39
  • \$\begingroup\$ Actually no, Unity automatically unticks read only when you hit apply. I can't even copy all prefabs into a seperate folder so in case I overwrite something I can get back to the original. It still messes up everything. This is really frustrating. Sometimes it takes 5 hours to set everthing up - one mouseclick on the wrong button and I can start over from scratch. \$\endgroup\$
    – AzulShiva
    Oct 28, 2018 at 14:51
  • \$\begingroup\$ i agree, the Prefab system has caused me a lot of headache as well. It would be great if the Prefab changes were one way only. Only changes to the main Prefab would change downstream instances of that Prefab but changes to Prefabs in a scene do not go upstream to the main Prefab. \$\endgroup\$ Oct 29, 2018 at 15:25
  • \$\begingroup\$ Have you considered using a version control system like Git? You can automatically revert to old committed versions if you make mistakes. \$\endgroup\$
    – Ed Marty
    Oct 29, 2018 at 23:45


You must log in to answer this question.

Browse other questions tagged .