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:
https://docs.microsoft.com/en-us/dotn...
Unity docs [HideInInspector]:
https://docs.unity3d.com/ScriptRefere...
Unity docs [SerializedField]:
https://docs.unity3d.com/ScriptRefere...
#UnityScripting #AccessModifiers #Attributes
00:00 Intro
00:13 Access Modifiers (with examples)
03:45 In the Inspector
04:49 Summary
05:33 FAQ
Watch video Learn the difference between public, private and serialized - variables visibility in Unity online without registration, duration hours minute second in high quality. This video was added by user PitiIT 23 January 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,695 once and liked it 76 people.