UnityException: ValidateAgainstExecutionFlags can only be called from the main thread. Constructors and field initializers will be executed from the loading thread when loading a scene. Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function. at UnityEngine.Rendering.CommandBuffer.ValidateAgainstExecutionFlags (UnityEngine.Rendering.CommandBufferExecutionFlags requiredFlags, UnityEngine.Rendering.CommandBufferExecutionFlags invalidFlags) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.Rendering.CommandBuffer.IssuePluginEventAndData (System.IntPtr callback, System.Int32 eventID, System.IntPtr data) [0x00000] in <00000000000000000000000000000000>:0 at Unity.WebRTC.VideoEncoderMethods.FinalizeEncoder (System.IntPtr callback, System.IntPtr track) [0x00000] in <00000000000000000000000000000000>:0 at Unity.WebRTC.VideoStreamTrack.Dispose () [0x00000] in <00000000000000000000000000000000>:0 at Unity.WebRTC.MediaStreamTrack.Finalize () [0x00000] in <00000000000000000000000000000000>:0 UnityEngine.DebugLogHandler:LogException(Exception, Object) UnityEngine.Logger:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) UnityEngine.<>c:b__0_0(Object, UnhandledExceptionEventArgs) System.UnhandledExceptionEventHandler:Invoke(Object, UnhandledExceptionEventArgs)