Check out example codes for "unchangable public variable unity". It will help you in understanding the concepts better.

Code Example 1

If ( My Varaible != what you want to the value to be)
{
	My Variable = the value you want it to be .
}

Learn ReactJs, React Native from akashmittal.com