Answer the question
In order to leave comments, you need to log in
How to exit the loop when the checkbox is cleared?
I have a script:
When I enable a checkbox, a loop starts.
And c# does not allow me to turn off the checkbox because there is always a cycle, how to fix it?
Answer the question
In order to leave comments, you need to log in
Use System.Threading.Thread
to run your loop on a separate thread. In general, multithreading is a separate topic, you will also have to learn Mutex
's in order for threads to safely access shared data.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question