Ive got simple question - is it possible to force prefab not save script variables with it?
For example I make enemy prefab, with some script and variable RANGE with is unique for each enemy.
Later Ive added some additional gameobjects (childs) to enemy prefab and I wanna update changes to all other enemy prefabs. But … when I will do this - it will take my RANGE variable from my changed prefab and assign this value to other enemies on scene.
Can I force some script variables to not be “updating” with prefab?
Private var will not do job becasue I wanna see this variable in inspector.
If you think about it well the problem isn’t the script but you have a problem with the gameobjects, its them that hold the values.
Maybe you could create another script that creates these prefabs and then set the values of the range directly by the script and not by the input in the inspector.
yes this is one of ideas but I was looking for simpler one. I really dont need some kind of custom object manager with separate editor made for this … too much work for too much of different type of objects
I need be able to create, move, resize and make all editing stuff in editor.
I just dont wanna prefab keep my script variables inside … but I think its impossible.
example :
I have ENEMY PREFAB with script PATROL in it
Script PATROL have variable RANGE : float visible in inspector so i can adjust each range for each enemy. Sometimes we need 1 unit, sometimes 10 units.
Now level designer set this enemies on level and set individual amount of range.
All works ok until I wanna change something in this prefab and apply changes - when I do this - all other enemies get “range” variable from this prefab I changed …