Table of Contents

Class CameraImageRenderer

Namespace
easyar
Assembly
EasyAR.Sense.dll

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

[DisallowMultipleComponent]
public class CameraImageRenderer : MonoBehaviour
Inheritance
CameraImageRenderer

Properties

enabled

ARSession Enables/disables camera image rendering during runtime (if controlled by EasyAR).

public bool enabled { get; set; }

Methods

DropTargetTexture(Action<Camera, RenderTexture>)

Releases the RenderTexture used for drawing camera images. Internal resources will be released after all holders have released them.

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

Parameters

targetTextureEventHandler

RequestTargetTexture(Action<Camera, RenderTexture>)

Gets the camera image's RenderTexture.

The texture obtained through this interface is the full-size image from the easyar.OutputFrame, without screen cropping. The targetTextureEventHandler action passes out the RenderTexture and the Camera used for drawing the texture. This action is not called every frame, nor when the 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, so when not in use, you need to call DropTargetTexture(Action<Camera, RenderTexture>) to release resources.

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

Parameters

targetTextureEventHandler

Events

OnFrameRenderUpdate

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

public event Action<Material, Vector2> OnFrameRenderUpdate