To clarify, I want the first GenerateMaze to run. As soon as that function finishes, the second GenerateMaze should execute. The code posted above runs both instances of GenerateMaze on scene play. I tried implementing a spin lock by adding a global bool “ready”
I tried that before implementing a spinner, but I was getting irregular results. I assumed it was weird behavior caused by nested coroutine calls, but it was actually a bug in my code. Got it working thanks
Starting two coroutines means they will be executing along side each other. That is the nature of a coroutine.
It sounds like you have it working, but why do you need coroutines at all? If you call two functions, one after each other, the first function will finish, then the second will run.