Why not ScriptableObject

Not sure if this gets answered latter, but why are we not using a ScriptableObject to store the attack data?

EDIT:
Just thought about it a bit more why are we not using a struct to store this data either?

I believe it’s simply because that’s what Nathan chose. You can use a ScriptableObject or a struct if you want. It makes no difference, really.

A ScriptableObject may be a bit much because you would need a scriptable object asset for each attack that leads to a specific other attack - like after this attack, do attack 2, and if the knockback need to change, you will need a new asset, and if you instead want an attack that goes to attack 3 you’d need a new asset, etc.

An argument could be made for using structs instead, but it doesn’t make much difference there

There are many paths to the same goal.

For easier integration with the RPG courses, using a ScriptableObject with a definition for the weapons and an array of attacks would be an ideal choice (at least that’s the route I’m taking).

Privacy & Terms