Question by
MrSydar · Aug 30, 2019 at 05:50 PM ·
c#coroutinecoroutinesienumeratorfunctions
IEnumerator inner functions
I want to use in the IEnumerator my internal bool function which to proceed needs some time. Question: Whether I'll loose frame rate when call this function, and if yes are there any possible solutions to save performance?
IEnumerator Example()
{
bool Example_inner_function(arguments)
{
for(int i = 0; i < 9999; i++)
{
//some more calculations...
}
return true;
}
for(int i = 0; i < 9999; i++)
{
//calculations...
Example_inner_function(arg);
//...
yield return null;
}
}
Comment