I am seeing a problem when I declare a public constant such as
public float min_clearance = 0.002f;
when declared the first time this is correctly populated into the inspector and can then be read by other scripts.
However if I then change this to be say
public float min_clearance = 0.005f;
and save the script, the new value is not copied/updated in the inspector and other classes which read this constant get given the old value rather than the new value.:(.
You’re initializing a field, this way to set values will happen only one time before the constructor, when you add this script as a component in some object unity will construct your class and your fields will be initialized, any time after this point your field initializer will have no effect on the current field value. This will update if you re-add a component or press reset in the component context