Changing variable if there are many scripts.
I have two different objects and they have same behaviour script. I'm changing var of script with another script like "mainScript.var = newValue", but it changing all vars in all objects that have this script.
@nikolin595, there are reasons why that happens. You have to show us the scripts involved.
I seen answer of one topic that says to make static variable public. If it wont work I'll show scripts.
That's why I asked to see your scripts. public or private isn't the issue. Static variables are shared by all instances of the class. If you want each instance to have a unique value, don't use Static variables.
Don't ask us to shoot in the dark! Always show your scripts!
Your answer
Follow this Question
Related Questions
Adding a cost reduction to my purchasable items 1 Answer
how do I rezolve "look rotation viewing vector is zero"? 1 Answer
RayCast issues 0 Answers
scripting problems please help 0 Answers