- Home /
Unity: How can you make a prefab immutable for instance overrides
How can I make a component not result in an instance override generation like the alignment components (Position, Rotation, Width, Height)?
Is there a hidden attribute that is applied to the Transform class parameters that results in this?
I also read about immutable prefabs. How can I make my prefab immutable?
Here is my situation: I am creating prefabs of game objects with a collider and a sprite renderer attached to it. There are 3 predefined sizes with colors. So I create 3 prefabs. The problem is that there is a script that needs to be configured from the editor for each instance. So if I place the items in the scene and then by mistake apply the overrides the prefab values will change which is not desired behavior.
Your answer
![](https://koobas.hobune.stream/wayback/20220612191344im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Prefabs won't change? 1 Answer
instantiated GameObject Prefab jumps in air after instantiate 1 Answer
What does it mean to link prefabs? 1 Answer
Some components missing in the prefab (clone) 0 Answers
Prefab Path Issues 0 Answers