moveSpeed variable not automatically updating

So, I’m able to modify the moveSpeed variable in the inspector but setting:

[SerializeField] float moveSpeed = 10f;

does not cause the inspector to automatically update the move Speed inside the inspector itself and it must be done manually.

Yes. Once you set a value in the inspector, the change in code will no longer update the value. This is by design. The value in the inspector is serialized to file and overrides the value in the code.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms