[C# NOOB] How can I change a variable in a script from another script?
I have this line:
public int NumberOfJumpsLeft;
And I want to make a power-up for double-jumping, so I'd need to set the NumberOfJumpsLeft to += 1.
How can I do this from another script?
Comment
Very common Q. Very, very common. You should be able to do a Search using a few of those words and "unity," and find several Answered Qs here about it.
Otherwise, I moved it into the Help Room area.
Your answer
Follow this Question
Related Questions
How do I access a variable/class from a C# file in a JS file? 1 Answer
C# - Access the Same Variable in Two Scripts 1 Answer
Controlling Character Speed via a Public Variable? 0 Answers
Variable changing from other script does not work. 1 Answer
Cant access variables outside of On Click() function 1 Answer