FastScriptReload icon indicating copy to clipboard operation
FastScriptReload copied to clipboard

Hot Reloading running coroutine can sometimes cause issues

Open handzlikchris opened this issue 2 years ago • 1 comments

this is what happens to me. First time I deleted for loop it works, because FSR reloaded scripts when coroutine entered the first loop. Second time I delete the same for loop, FSR reloads scripts while coroutine is inside the deleted loop and it freezes

https://user-images.githubusercontent.com/6343986/231097378-5286c659-63c0-4863-adc9-d81d4b440e31.mp4

handzlikchris avatar Apr 11 '23 08:04 handzlikchris

I've got a suspicion as to why this may happen, yield instructions are extracted into auto-generated enumerator class. And MoveNext() and GetCurrent are used to get value in calling code.

The naming is automatic. I think detour may pick up wrong instance from time to time and that's why sometimes you see results and other times you do not.

Move investigation needed

handzlikchris avatar Apr 11 '23 08:04 handzlikchris