Open unitycoder opened 5 years ago
some ideas to make floodfill appear slowly:
convert void FloodFill(int x, int y into coroutine IEnumerator FloodFill(int x, int y
void FloodFill(int x, int y
IEnumerator FloodFill(int x, int y
then add yield return null; inside the while loop. (could make it being called only every x steps though, to keep it faster)
yield return null;
also need to call the floodfill with StartCoroutine() then. AND might have to set textureNeedsUpdate to true from the coroutine loop also.
some ideas to make floodfill appear slowly:
convert
void FloodFill(int x, int y
into coroutineIEnumerator FloodFill(int x, int y
then add
yield return null;
inside the while loop. (could make it being called only every x steps though, to keep it faster)also need to call the floodfill with StartCoroutine() then. AND might have to set textureNeedsUpdate to true from the coroutine loop also.