I have a thread that is created when a certain class is instantiated and contains a while loop. How can I make it so that the loop runs, at most, once per frame?
At the end of your while loop add:
yield return;
Or, if your loop already returns something, add “yield” before the return statement.
This will only allow the code to run up to once per frame.