For my quiz, I’m wanting to populate my quiz questions from a series of tagged scriptable game objects. Its a flash card game for language learning, so for every “question” (word), I have included different tags in the form of a list of strings. Categories include “Food” “numbers” “colors”, etc.[Each one has more than one tag/category/keyword, which is why I chose to do it this way]. So if I decide I want to quiz myself on just words related to food, I want to be able to hit a button in my menu that says “food” which will include that category. If I want to quiz Food and Numbers, I can hit “food” & “numbers” buttons.
The Logic I’m considering is, when I click the button, I grab the text from that button and add that text to a list of strings(?). Then using that list of strings, I can do a foreach loop that iterates through the indices of that list, adding all the SOs’ words that contain any of those chosen tags to a new list (the question pool) to be quizzed on when I start the lesson.
I’ve tested a short easy version to see if what I have so far will populate the new list and it works. What I’m having a hard time with is how to store that text when I click the button.
I have a Question Manager script which is where I was going to store the method, but I can’t think of how it stores the text from the click. The only way I know how to access things is by making a variable and then dragging and dropping game assets into that slot in the inspector. I’ve tried googling it and I get the same thing I just mentioned with the variables and filling it in in the inspector. I got something about EventSystems.current.current-something but I couldn’t get it to work and I think that was just the name of the asset, not the text in the field.
Anyways. I’m probably overthinking it and now I’m frustrated. So any help would be appreciated.