Hey there, first time writing here, so bare with me if I’m doing something wrong.
So what I’m currently working on is a game for parties. Now, I made a Settings scene containing 3 checkboxes, Questions, Games and Dares, and you can toggle/untoggle them.
Then when the game initializes, I create a loop through all the questions and check their categories (Which are selected in the inspector for each question) and if the questions category matches one of the checkboxes (If you toggle/untoggle, they change a public bool which I can access for each category) then the question has to be removed.
It works fairly well, the checkboxes change the bools etc. but the removal of the ones that are unselected doesn’t work.
This is the loop:
for(int i = 0; i < AllQuestions.Count; i++)
{
if (AllQuestions*.category == "Question" && !SettingsManager.Questions)*
-
{*
_ AllQuestions.Remove(AllQuestions*);_
_ }_
_ else if (AllQuestions.category == “Game” && !SettingsManager.Games)
{
AllQuestions.Remove(AllQuestions);
}
else if (AllQuestions.category == “Dare” && !SettingsManager.Dares)
{
AllQuestions.Remove(AllQuestions);
}
}*
is it possible that it might be that the table is a private static?_