The variable value is not changhing and it is really weird i need help.
So…
TotalBullets = TotalBullets + AmmoFromBoxes;
and
TotalBulletsText.text =“”;
TotalBulletsText.text += TotalBullets;
// kinda weird but thats how i do it
well the variable value does not change. the text remains the same. if i do
Debug.Log(TotalBullets);
in
void Update()
then the value goes one frame the previous amount and the other frame the amount that it should be.
150
120
150
120
150
120
…you get it
if i do it again
180
120
180
120
…
And if i just
Debug.Log(TotalBullets);
after the variable increase it gives me the right value everytime…
TotalBullets is private
I tried many things but it seems like this is a bug.
I am using unity version 5.3.5f1.
Pls help