I have a script named “Gun.cs”:
public class Gun: MonoBehaviour {
public bool isMachineGun;
public float damagePower;
// other logic here
}
now I assign this script to a prefab, than drag the pfreab to the scene, rename the game object to
“G1”, repeat that , so finally I get some game objects with name “G1” “G2” …
And I set the variable “isMachineGun” of G1 to true , G2 false , …
The problem is : every time I apply changes to prefab by click the “Apply” button , all game objects
will have the same setting , all the ‘isMachineGun’ will have the same value .
How can I only apply some of setting to prefab?
In other words, How can I only apply ‘damagePower’ setting to prefab everytime , but not ‘isMachineGun’ ?
Thanks.