Class SceneVideoSource
Custom video source capturing the Unity scene content as rendered by a given camera, and sending it as a video track through the selected peer connection.
Inherited Members
Namespace: Microsoft.MixedReality.WebRTC.Unity
Assembly: cs.temp.dll.dll
Syntax
public class SceneVideoSource : CustomVideoSource<Argb32VideoFrameStorage>
Fields
CameraEvent
Camera event indicating the point in time during the Unity frame rendering when the camera rendering is to be captured.
This defaults to
Declaration
public CameraEvent CameraEvent
Field Value
Type | Description |
---|---|
CameraEvent |
SourceCamera
Camera used to capture the scene content, whose rendering is used as video content for the track.
Declaration
public Camera SourceCamera
Field Value
Type | Description |
---|---|
Camera |
Remarks
If the project uses Multi-Pass stereoscopic rendering, then this camera needs to render to a single eye to produce a single video frame. Generally this means that this needs to be a separate Unity camera from the one used for XR rendering, which is generally rendering to both eyes.
If the project uses Single-Pass Instanced stereoscopic rendering, then Unity 2019.1+ is required to make this component work, due to the fact earlier versions of Unity are missing some command buffer API calls to be able to efficiently access the camera backbuffer in this mode. For Unity 2018.3 users who cannot upgrade, use Single-Pass (non-instanced) instead.
Methods
OnDisable()
Declaration
protected override void OnDisable()
Overrides
OnEnable()
Declaration
protected override void OnEnable()
Overrides
OnFrameRequested(in FrameRequest)
Declaration
protected override void OnFrameRequested(in FrameRequest request)
Parameters
Type | Name | Description |
---|---|---|
FrameRequest | request |