is it possible toggle bool at editor by script?

I have a GameDataEditor. I entry my questions by this but I want to toggle bool when a question asked. so if a question asked, then “asked” bool will true and never seem in game. the questions asking as random. Is it possible make it?

public void ShowQuestions()
{        
    currentRoundData = dataController.GetCurrentRoundData();
    questionPool = currentRoundData.questions;
    questionIndex = Random.Range(0, questionPool.Count);
    if (!questionPool[questionIndex].asked)
    {
        
        questionData = questionPool[questionIndex];
        questionDisplay.GetComponentInChildren<TextMeshProUGUI>().text = questionData.question;
    }

   else{
     questionIndex = Random.Range(0, questionPool.Count);
   }
}

public void Close()
{
    questionPool[questionIndex].asked = true;
}

Close method is a button method.

Good day.

Of course is possible. I recommend you to have all qiestions in an array. All question will have then a index number inside the array.

Then you only need to create another array, (lets call it infoArray) boolean type, with same lenght as questions array. Every time yo do somethig with a question, you must read/change the data in the infoarray. This way you can know if a question has been asked, or answered…

You can do more than 1 aditional array, one for the puntuation for each question, one to know if it has been asked or answered, etc…

Thats all multiple arrays sharing the index numbers.
If need help with array scripting, look for some tutorials like this
Bye!
(If helped, accept the answer!)