private IEnumerator FadeOutPaintCanvasFunc(float time = 1f) { float perTime = time / 100; for (int i = 0; i < _listPainter.Count; i++) { RenderTexturePainter painter = _listPainter[i]; if (true == painter.IsInited) { for (int j = 0; j < 100; i++) { painter.CanvasAlpha = 1 - j * 0.01f; yield return(new WaitForSeconds(perTime)); } painter.Dispose(); } } _coFadeCanvas = null; }