A
A
Anton Vertov2017-07-05 23:22:39
C++ / C#
Anton Vertov, 2017-07-05 23:22:39

Unity3D. C#. How to check 9 variables (toggle) in a loop?

Good day. There are 9 checkboxes (Toggle). These are the categories of questions.
I need to check if each checkbox is checked and, depending on this, understand whether to include a list of questions for this category or not. Please provide an example of such an implementation.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Trifonov, 2017-07-06
@1Frosty

Rough decision in the forehead:
for (i = 0; i < boolArray.Length; i++) {
if (boolArray[i]) {
//add a list of questions %i%
}}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question