Це відео не доступне.
Перепрошуємо.

Unity 2021 Use Scriptable Object instead of Enum

Поділитися
Вставка
  • Опубліковано 15 лис 2021
  • "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 - Ga...
    Learn to write more maintainable code using Design patterns by making a 2d platformer game:
    courses.sunnyvalleystudio.com/
    Project files for Patreons:
    / 58777788
    Have any questions? Join the discord:
    / discord
    Assets used:
    quaternius.com/
    #scriptableobject #unity3d #enum #csharp #sunnyvalleystudio #unitytips

КОМЕНТАРІ • 111