"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
On this page of the site you can watch the video online Unity 2021 Use Scriptable Object instead of Enum with a duration of hours minute second in good quality, which was uploaded by the user Sunny Valley Studio 16 November 2021, share the link with friends and acquaintances, this video has already been watched 41,410 times on youtube and it was liked by 1.2 thousand viewers. Enjoy your viewing!