Uploaded February 2021 | Updated September 2026, 2 weeks ago
In this Unity quick tip we're going to look at how we can rename fields in a script without losing the values we have set in the inspector.
If you prefer written instructions you can find a link to the text version here - ketra-games.com/2021/02/renaming-a-field-without-losing-the-inspector-value-unity-game-tutorial.html
00:00 - Introduction
00:20 - Demonstration of how field values are lost when renaming
01:41 - Renaming fields safely using the FormerlySerializedAs Attribute
In this Unity quick tip we're going to look at how we can rename fields in a script without losing the values we have set in the inspector.
If you prefer written instructions you can find a link to the text version here - ketra-games.com/2021/02/renaming-a-field-without-losing-the-inspector-value-unity-game-tutorial.html
00:00 - Introduction
00:20 - Demonstration of how field values are lost when renaming
01:41 - Renaming fields safely using the FormerlySerializedAs Attribute










