public IEnumerator UpdateRuntimeData(LayerRuntimeData runtimeData) { while (true) { CameraUtils.CopyCameraPosAndSize(runtimeData.catchCamera, Camera.main); ScreenTextureAllocator.allocateTexture(ref runtimeData.catchTexture, () => runtimeData.catchCamera.targetTexture = runtimeData.catchTexture); yield return(null); } }