From Unity 5.6, I got the following error when Camera.Render() is called in Update() function:
Rendering camera ‘DrawSomethingToRenderTexture’, but calling code does not set it up as current camera (current camera: ‘Main Camera’)
I noticed that Camera has SetCurrent(Camera) static function, but this function did not help.
Is there any way to remove this error? Or, Camera.Render() should not be called in Update function? I need to call it in Update function to see a rendered texture in Editor. The script has “ExecuteInEditMode” attribute but camera events such as OnPostRender are not called in edit mode. So, I had to manually call Camera.Render() in Update function which will be called in edit mode.