Why and how to use Encapsulation in Unity with a simple example

Опубликовано: 02 Октябрь 2024
на канале: Jason Weimann (GameDev)
9,512
342

Check out the Course: https://bit.ly/3i7lLtH

-------

Not sure what encapsulation is or why you should use it? Here's a simple example that shows one of the pitfalls of failing to encapsulate your classes right. Luckily, it's easy to do it right with the SerializeField attribute in Unity3D.

More Info & Project Download: https://unity3d.college/2016/02/15/ed...

Join the FB Group: http://unity3d.group