filmov
tv
Unity 2021 Use Scriptable Object instead of Enum

Показать описание
"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":
Learn to write more maintainable code using Design patterns by making a 2d platformer game:
Project files for Patreons:
Have any questions? Join the discord:
Assets used:
#scriptableobject #unity3d #enum #csharp #sunnyvalleystudio #unitytips
-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":
Learn to write more maintainable code using Design patterns by making a 2d platformer game:
Project files for Patreons:
Have any questions? Join the discord:
Assets used:
#scriptableobject #unity3d #enum #csharp #sunnyvalleystudio #unitytips
Unity 2021 Use Scriptable Object instead of Enum
SCRIPTABLE OBJECTS in Unity
Unity SCRIPTABLE Objects - Easy Tutorial
How to Use SCRIPTABLE OBJECTS in your UNITY GAME 2021
Scriptable Objects Unity
Unity SCRIPTABLE OBJECTS - Tutorial
Scriptable Objects Nedir? | Unity 3D
USANDO SCRIPTABLE OBJECTS NA UNITY | TUTORIAL
How To Use Scriptable Objects in Unity – Game Baking Ordeal #1
What are Scriptable Objects in Unity and How to use them | Unity Tutorial
What are Scriptable Objects? (EXTREMELY Useful, Make your games Designer Friendly)
LEVEL/CAR/WEAPON Selection with Unity Scriptable Objects
Shop Tutorial Unity #2 [2021] - Scriptable Objects
Tutorial Unity - 10 ScriptableObject [2022]
Unity Nested Scriptable Objects - Tutorial
Scriptable Objects 101 in Unity3D
3 Interesting Ways Scriptable Objects can fix YOUR Unity3d project now!
Scriptable Objects In Unity
Simple Example of Scriptable Object - UNITY
ScriptableObject в Unity на примере информации о сундуках
Unity how i use a lot of scriptable objects
How to Quickly SETUP New Scenes in UNITY using SCRIPTABLE OBJECTS! (Unity Tips)
Unity Tutorial: Scriptable Objects
Unity Scriptable Objects in 3 Minutes!
Комментарии