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
Смотрите видео Learn the difference between public, private and serialized - variables visibility in Unity онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь PitiIT 23 Январь 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,695 раз и оно понравилось 76 людям.