I'm used to application development with frameworks like Qt, and I'm really fond of using MVC-like patterns. Now I'm diving into game dev and I have a bunch of data that I want to show the user and I'm wondering the Unity way to do that. For example, say I want a flyout menu that appears on hover of an ability that looks like this badly drawn paint image below:
Say I have 60+ abilities on paper that all have the following data:
- ability art icon
- name
- description
- attributes such as cooldown amount, type, modifiers, etc
I want to make it such that I can feed some system this data and it just displays the correct thing at the right time. This way when I add new abilities the system already just knows how to handle it.
My question:
What is the Unity way to:
- Store this data?
- MapUse this data to drive a UI element?
I've looked at scriptable objects, they seem like they will play a role here but I'm still unclear as to how that gets mapped to UI elements. I'm also guessing that scriptable objects are preferred over reading in a JSON file or data on a database? Maybe someone can confirm that. I suppose I'm asking for best practice here.
