Scriptable Cookbook: Damage Type System With ScriptableObject Enums (Unity Tutorial)

Uploaded by Matt MirrorFish
Share: Twitter Facebook
In this Unity3d tutorial we learn how to create and use ScriptableObjects to replace C# enums or enumerations in a flexible and extensible approach. We'll use this to setup a simple elemental damage system with different damage types like fire, ice, and poison. The idea is that we can check equality against the ScriptableObject asset, instead of checking against an Enum entry. We can also add data or code to these objects as needed. This is an adaptation of an approach shown by Richard Fine and Ryan Hipple in their respective Unite talks which can be found in the Scriptable Cookbook playlist here:

https://www.youtube.com/playlist?list=PLuldlT8dkudpCEkYQJb_H26BcbE7ozisX