Some quick background: I’m making a 2D game, and I’m storing abilities as ScriptableObjects for ease of implementation.
I’m looking to implement a 2D array (or at least something functionally similar) as a field for my ability ScriptableObject:
I’m still new to programming, so I’ve mostly been looking up tutorials on various concepts that I’m unfamiliar with, and I followed this tutorial to create a script that has a 2D array of bools that would be functionally similar to what I was looking for (Panel oirign would be a seperate field that I would set manually, the bools would just determine which panels were hit): Unity3D - 2D Array In Inspector - YouTube
My plan was to make a script like that (but 3x8) and attach it to each ability similar to how I attach the prefab for the FX. My thought was that if I were to do that, each ability would have its own instance of that script, and as such its own array of panels that were marked as “true” that I could reference. However, I seem to be unable to attach the script to my ScriptableObject at all. I called the class
RangeResolver (what the tutorial video used “TestScript” for) and tried setting a
public RangeResolver attackRange field in my ability ScriptableObject, but I cannot drag or select a script onto that field in the inspector.
I’m completely at a loss on how to proceed. If anyone has any ideas on how I can implement a 2D Array on a ScriptableObject as a field and how I can access the information in said array, I would be super grateful!