Learn the difference between public, private and serialized - variables visibility in Unity @PitiITNet
Learn the difference between public, private and serialized - variables visibility in Unity  @PitiITNet
Uploaded January 2022 | Updated September 2026, 2 days ago
If you want to finally learn if you should use [SerializedField] private or public you are in good place! We'll not only cover how to show and hide variables in the inspector but also the most important access modifiers.

Public, private, protected, internal? Got you covered!
SerializedField, HideInInspector? Got you covered too!
Common questions and good practices? Of course!

Official C# docs about access modifiers:
docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/access-modifiers
Unity docs [HideInInspector]:
docs.unity3d.com/ScriptReference/HideInInspector.html
Unity docs [SerializedField]:
docs.unity3d.com/ScriptReference/SerializeField.html

#UnityScripting #AccessModifiers #Attributes

00:00 Intro
00:13 Access Modifiers (with examples)
03:45 In the Inspector
04:49 Summary
05:33 FAQ
Learn the difference between public, private and serialized - variables visibility in UnityThe Community Game Jam + Tips on how to do well in ANY game jam!Unity Tutorial: Metroidvania style level changing (scene changing)Game Dev Question: Whats the best Game Engine to start with?Make Your First Shooter Game in Unity Today!Unity - 2d Platform Movement - Gliding in under 3min! Learn how gravity affects velocity!Unity Tutorial: Top down shooter movement (mouse and keyboard)Animate your character in Blender (for Unity)Vectors in Unity: From Basics to Practical ApplicationsHWTC: Happy Worker Tool Company - Official Trialer | Indie Horror Game | Warehouse Work SimulatorUnity Tutorial: Procedural Cave Generation Step by StepUnity Course – Inventory system, perfect for RPG, Roguelike and Stardew Valley like games!
PitiIT |

Learn the difference between public, private and serialized - variables visibility in Unity

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER