- Home /
Question by
jsr2k1 · Dec 22, 2021 at 10:43 AM ·
coroutines
How can we debug the result value of a Coroutine?
Hello everyone,
Is there a way to know the result of a coroutine inside the same context?
We start a coroutine like this:
float maxValue = 0f;
yield return StartCoroutine(GetMaxSize(value => maxValue = value);
The problem is, stopping after the coroutine is finished, we are unable to watch the 'maxValue' in Visual Studio. We always need to move 'maxValue' as global. In VS we can't see the value if 'maxValue' is local.
Any ideas?
Comment
Your answer
Follow this Question
Related Questions
Brain exploding ... Problem with an internal Coroutine manager 3 Answers
Coroutines stop when another game goes fullscreen 1 Answer
I don't understand coroutines and invoke 1 Answer
Use Delay time in Abstract Class 3 Answers
Coroutine couldn't be started because the the game object 'LevelManager' is inactive! 1 Answer