I have an integer field in my inspector. I have assigned a default value in the script on initialization, however the value is ignored by Unity, because sometime back I set a value to its field in the Inspector. Since then setting the value to 0 or simply deleting it and unfocussing the field doesn’t delete the value.
With GameObjects and other item component it would be easy by selecting “None”, but this one doesn’t have such slider.
I understand I could reset the entire component, but its going to get problematic if I have to do this every time I want Unity to ignore Inspector values. I also could delete the variable, and then set it again, but that is a workaround, not a solution. I also could set that value in Awake()
but once again, that’s a workaround.
What is a proper way to “deset” a value in the inspector, so that my scripts are once again deciding what the variable’s initial value should be?