Unity 2021 Use Scriptable Object instead of Enum
Автор: Sunny Valley Studio
Загружено: 2021-11-16
Просмотров: 41066
Описание:
"Why can't I create Enum values from all of my weapon in my prefab folder?!"
-me few years ago
When I was learning how to use Enums in Unity I knew that they are meant to represent state of something ex player has a WeaponType.Sword. This was wrong thinking. While they are good to represent ex cardinal directions (assuming that no one will add more) adding new enum for a new weapon type or anything that is certain to change / grow is not the way. Scriptable objects (and a bit of Object Oriented design) are. Let me show you why :)
Reference "Unite Austin 2017 - Game Architecture with Scriptable Objects":
• Unite Austin 2017 - Game Architecture with...
Learn to write more maintainable code using Design patterns by making a 2d platformer game:
https://courses.sunnyvalleystudio.com/
Project files for Patreons:
/ 58777788
Have any questions? Join the discord:
/ discord
Assets used:
https://quaternius.com/
#scriptableobject #unity3d #enum #csharp #sunnyvalleystudio #unitytips
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: