Skip to main content

Timeline for Recursive Unity Coroutine

Current License: CC BY-SA 3.0

10 events
when toggle format what by license comment
Nov 19, 2017 at 11:47 vote accept user3797758
Nov 16, 2017 at 18:08 answer added user3797758 timeline score: 2
Nov 15, 2017 at 21:18 comment added DMGregory If you're happy with the solution then please feel free to post it as an Answer you can Accept. :)
Nov 15, 2017 at 21:17 comment added user3797758 @DMGregory It's not too bad now I refactored the code that I added and it only added ~10 lines
Nov 15, 2017 at 20:25 comment added DMGregory It does, that's why I suspect a more elegant solution might be possible if you edit your question to describe the root graph search problem you're trying to solve and how you want that search to behave.
Nov 15, 2017 at 19:08 comment added user3797758 Ahh, yeah that works. Though it does make the code kinda clunky
Nov 15, 2017 at 18:23 comment added DMGregory That's a start. Please edit your question to include this information, and explain at what points in the graph search you do and don't want it to pause.
Nov 15, 2017 at 18:18 comment added user3797758 it has to search a grid area to mark enclosed spaces. I had a few other solutions but the problem is that the spaces are irregular. So this essentially propagates itself across all grid tiles that could be linked together, because of the recursion I know that no tiles will be missed.
Nov 15, 2017 at 18:12 comment added DMGregory Since the recursive calls are themselves just IEnumerators, you can step them manually in a loop as shown here, ignoring any unwanted pauses. This looks a bit like an XY problem though, and there might be a more elegant solution to accomplish your original goal. Can you tell us a bit more about the feature this coroutine is serving? We might be able to support that feature in a different way.
Nov 15, 2017 at 17:57 history asked user3797758 CC BY-SA 3.0