Question by
way3edgy · Jun 09, 2021 at 03:41 PM ·
c#programmingglitchinteger
Unity Setting Integer to 0 continuously?
I have a public integer representing difficult ranging from 1-3, but Unity keeps setting it to 0. It's set to 1 in the inspector, the Start function, and a SetDifficulty function has an override to set it to 1 if it's set to 0 somehow, yet by running Debug.Log in Update I can see it is always 0. It never did this before today, no other scripts interact with it, and I tried making it private or serializing it to no avail. Has anyone ever had this issue? I'm not sure what's happening.
Unity.4.26f1.
Comment