GameViewEncoder

Description
GameViewEncoder can convert your Game View into byte[] for streaming.

It’s compatible with our example networking systems FM Network UDP and FM WebSocket. Meanwhile, other 3rd party networking systems like PUN2, MIRROR and UNet are also supported.


Component Properties

Capture Mode
– RenderCam: use you target RenderCam as source input
– MainCam: use your main camera as source input
– FullScreen: capture your final rendering including UI Canvas
– Desktop: capture your System OS Desktop

RenderCam
– source camera for RenderCam Mode

MainCam
– source camera for MainCam Mode

Resolution
– Streaming Resolution in pixels

ResolutionScaling
– Streaming Resolution is relative to the source camera with scaling

MatchScreenAspect
– Force the resolution matching the aspect ratio of your main camera

PanoramaMode
– Capture in panorama format

CubemapSampling
– Quality option for the cubemap sampling


Quality
– compression quality

StreamFPS
– target frame rate for the stream

FastEncodeMode
– enable fast encoder for better performance

AsyncEncodeMode
– multi-threading solution without blocking the main thread

AsyncGPUReadback
– wait and read GPU frame data, for better performance

ChromaSubsampling
– different sampling method: 444, 422, 420 and greyscale

GZipMode
– use GZip method to compress the data

ColorReductionLevel
– reduce the color range during encoding, which can reduce the stream bandwidth

ignoreSimilarTexture
– skip current frame with similar byte size

similarByteSizeThreshold
– threshold of byte length for the comparison between last frame

OnDataByteReadyEvent
– invoke when the decoded byte[] are ready

label ID
– encoder and decoder’s label ID should match

—– Desktop Capture Settings V2—–
Target Display
– Target Display ID between 1~8

FlipX
– horizontally flip the source input

FlipY
– vertically flip the source input

Range X
– Visible horizontal range of the texture

Range Y
– Visible vertical range of the texture

Offset X
– offset position in X coordinate

Offset Y
– offset position in Y coordinate

Rotation Angle
– rotation of the texture
—– Desktop Capture Settings —–