Declaration Question

I’ve moved the declaration for both moveSpeed and stoppingDistance outside of update so I can make them both Serialized Fields (planning ahead for gameplay tuning)

Is this something you’d recommend avoiding, and instead use getters/setters (or some other method) so you can maintain code readability/clarity, and still be able to adjust these settings via the inspector?

2 Likes

If you want to edit them in the editor then yup making them SerializeField private is indeed the correct way to go.

3 Likes

Thank you for the input! I’m usually stuck trying to balance code readability vs future gameplay design/tuning, so it’s great to get your opinion on it :smiley:

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

Privacy & Terms