Uploaded August 2022 | Updated September 2026, 2 days ago
In this tutorial we will explore how to add lives counter to the health system we created recently. This Unity Tutorial will be the last in the miniseries, I hope you enjoy it :). It was really fun to work on that small project. If you would like to access all the code & support me you can do both (at the same time! :D) on my patreon page: patreon.com/pitiit
If you are looking for a great community:
discord.gg/7fRBSsjGNW
00:00 Intro
00:20 Counter Setup
01:25 Lives Counter Script
04:05 Setup
04:27 Testing
04:45 After death actions
In this tutorial we will explore how to add lives counter to the health system we created recently. This Unity Tutorial will be the last in the miniseries, I hope you enjoy it :). It was really fun to work on that small project. If you would like to access all the code & support me you can do both (at the same time! :D) on my patreon page: patreon.com/pitiit
If you are looking for a great community:
discord.gg/7fRBSsjGNW
00:00 Intro
00:20 Counter Setup
01:25 Lives Counter Script
04:05 Setup
04:27 Testing
04:45 After death actions
![Learn the difference between public, private and serialized - variables visibility in Unity
If you want to finally learn if you should use [SerializedField] private or public you are in good place! Well 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/dotnet/csharp/programming-guide/classes-and-structs/access-modifiers
Unity docs [HideInInspector]:
https://docs.unity3d.com/ScriptReference/HideInInspector.html
Unity docs [SerializedField]:
https://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 Unity](https://i.ytimg.com/vi/qqeazsu89Fk/mqdefault.jpg)









