Table of Contents

Class CameraImageRenderer

Namespace
easyar
Assembly
EasyAR.Sense.dll

Controls camera-image-rendering in the sceneMonoBehaviour. Only effective when the session's frame-sourceIsCameraUnderControl is true.

[DisallowMultipleComponent]
public class CameraImageRenderer : MonoBehaviour
Inheritance
CameraImageRenderer

Methods

DropTargetTexture(Action<Camera, RenderTexture>)

Releases theRenderTexture used to draw the camera image. Internal resources will be released after all holders release them.

public void DropTargetTexture(Action<Camera, RenderTexture> targetTextureEventHandler)

Parameters

targetTextureEventHandler

RequestTargetTexture(Action<Camera, RenderTexture>)

Gets theRenderTexture for the camera image.

The texture obtained through this interface is the full-size image fromeasyar.OutputFrame, without screen-cropping. ThetargetTextureEventHandler action will pass theRenderTexture and theCamera used to draw the texture. This action is not called every frame, nor when camera-image-data changes; it only occurs when the texture itself is created or changed. Calling this method creates additional resources and may trigger rendering when necessary. Therefore, callDropTargetTexture(Action<Camera, RenderTexture>) to release resources when not in use.

public void RequestTargetTexture(Action<Camera, RenderTexture> targetTextureEventHandler)

Parameters

targetTextureEventHandler

Events

OnFrameRenderUpdate

Event for camera-image-rendering updates. This event will pass the material currently used for camera-image-rendering and the texture size. When this event occurs, the camera image itself may not necessarily have changed; it only indicates that a rendering has occurred.

public event Action<Material, Vector2> OnFrameRenderUpdate

Event Type