Unity function

Hi everybody

I will write my question as an example and I hope you will understand

void update(){
for (int i = 0; i < 10; i++) {

        System.Threading.Thread.Sleep(1000);  //dealy 1 second

As I have seen It will not print number every second but it will print 9 numbers after finishing the function or after 9 seconds.

So is there way or function that will print every second.

Thank you

Thank you I have did that by using coroutine function.