Apply prefab (except for one component?)

Here’s the thing- I’ve got an AI prefab that has a lot of options exposed. There’s also a Patrol Path component that I’ve built, and it stores a list of points and actions that the AI should perform when it’s on patrol.

More than once, however- I have made a change to one AI, and then hit the ‘apply’ button so it propagates to the rest of the units I have in the scene. The problem with that is, since my list of patrol nodes is serialized, it also gets applied to the master prefab. Obviously this is not ideal :slight_smile:

Does anybody know if there is a way to flag a script so that changes to it are not applied to a prefab? I’m assuming that there’s not… that would be way too convenient :expressionless:

There is a slight trick you could use:

For simplicity, let’s say we have a cube with a script with an int value. It is from a prefab. We have two prefabs in the scene which are exactly the same, wit their int at 0

Whenever we change the int value in either one of them, it will turn bold, marking it as “different” If we hit apply, it’s changes will be sent to all other prefabs. But ONLY in prefabs who’s int value is not bold.

In other words, just do some minor changes to the paths in all the prefabs you want protected. That will disconnect those paths from the prefab updates. Nothing to in-bulk disable updates to all objects though :frowning: