Uploaded October 2020 | Updated September 2026, 2 weeks ago
In this Unity quick tip we're going to look at how we can have private fields that can be set through the inspector.
If you prefer written instructions you can find a link to the text version here - ketra-games.com/2020/08/unity-game-tutorial-setting-private-fields-through-the-inspector.html.
Public Fields vs Private Fields in Unity
It's generally good practice to make fields private if we don't want them to be changed from other scripts, but doing this means they aren’t available to be set from the Inspector. In this tutorial we're going to look at how we can have the best of both worlds and have private fields that can be set through the inspector.
In this Unity quick tip we're going to look at how we can have private fields that can be set through the inspector.
If you prefer written instructions you can find a link to the text version here - ketra-games.com/2020/08/unity-game-tutorial-setting-private-fields-through-the-inspector.html.
Public Fields vs Private Fields in Unity
It's generally good practice to make fields private if we don't want them to be changed from other scripts, but doing this means they aren’t available to be set from the Inspector. In this tutorial we're going to look at how we can have the best of both worlds and have private fields that can be set through the inspector.










