How to do not apply fields in prefab

Hi, i have prefab that i have to put many times in my game. This prefab has script with 4 public bools and enum. I change this fields depending on environment. When i changed (for example)collider size in prefab and applied it, i lose all my settings in other instances… I think it is no sense to make prefab for each combination. There is some way to make fields that ignore apply, like a position in transform? Please help me. Sorry for poor English and thanks in advance.

As long as a value isn’t changed it’s linked to the prefab value. So when the prefab changes the value will change on all instances which have not modified the value themselfs.

To stop using the prefab value, change the value in the inspector on your instance. This will make the variable to show up in bold text which means it has been changed on this instance. For boolean values you can simply check and uncheck the value.

To revert this you can simply rightclick on the variable in the inspector and select “Revert Value to Prefab”. This will link the value back to the prefab value.

edit

Just to make sure you understand how prefabs work.

It’s not the prefab which applies something to instances. It’S the instance which links it’s values to the prefab. So each instance which hasn’t changed any of it’s values will read the prefab values. Whenever you change the value on an instance it will become seperated from the prefab value and show up bold.

When you press the “Apply” button on a prefab instance you effectively replace the prefab with the current instance and link all values of this instance to the prefab.

So basically you have full control over any value as long as you understand the dependencies.

You can also separate an instance completely from the prefab by selecting the instance and go to the menu GameObject → “Break Prefab Instance”. This will completely disconnect the instance from the prefab.