Math, asked by muhammadrafiu5901, 11 months ago

why does the value of a specific variable change in different functions unity

Answers

Answered by mvpraba7
0

Are you sure this gets compiled into the constructor? Since using the constructor is not recommended with MonoBehaviours for good reasons I don't think this is the case (in particular for the second example); that's what Awake() is for (initialization). From the recommendations for writing scripts in C#, I would conclude that in fact, javascript code outside of functions that needs to be executed goes into Awake(), and member variable declarations

Similar questions