I’m struggling to understand how a SerializedField works. For example, if I initialize a value in the script like so:
[Range(0.0f, 5f)] [SerializeField] private float walkSpeed = 0.5f;
Unity will accurately show the initialized value:
However, if I make a change to my script and initialize it at 0.8f
instead, for example, the 0.5
value remains in Unity and that is the value that is used when playing the game.
Is there a way to tell Unity to revert to the Script value instead or am I missing a standard behavior and reason that it behaves this way?