I have created a Billboard prefab in my game that has an image and a text description field.
What I need is for my code to sweep some specific areas of the hierarchy and according to the GameObject found, fill the Billboard image and description.
Now two things have to happen.
The first one is easy. The text field from the Billboard is simply the name of the GameObject.
The second one is where it gets tricky. According to its name, a predefined image need to be filled to the Billboard Image field.
Since I will be creating several Scenes and A LOT of images to choose from (certainly hundreds, probably thousands) I don’t know what is the correct way to store the information of the item in question.
Each item needs to have these fields:
[ID] Bool
[NAME] String
[CATEGORY] String
[UNIQUE] Bool
So, there are two possibilities here.
If an item IS NOT UNIQUE, then the code must fill the current Image with the category image.
if it IS UNIQUE, then it must use an image that was exclusively designed for that item.
I thought about using a Database OR Scriptable Objects. Both of them would access a folder inside the project with the images.
The downside of the Scriptable Objects I found is that I can’t think of a way to keep an item ID effectively.
I was wondering if you guys could tell me if I am going on the right direction or if there is a more recommended way to do this, because I haven’t found a better and clear way yet.
I am actually tending to using SQLite for this, given that there will be many items. I cant see how the suggestions you made would be the ideal case for handling that many options with ease.
I am struggling with finding a good tutorial on how to do the DB communication with unity. Can someone give me a direction?