cohtml.CohtmlLiveView

Component that needs to be attached to a camera and creates a Cohtml Live View. This allows a Unity Camera output or a RenderTexture to be displayed inside the HTML UI.

Inherits from MonoBehaviour

Protected Functions

Name
virtual voidAwake()
virtual voidStart()
virtual voidUpdate()
virtual voidOnEnable()
virtual voidOnDestroy()

Public Properties

Name
stringLiveViewName
Gets or sets the unique name identifier for this Live View. This name is used in the HTML to reference the image (e.g. background-image: url(‘coui://MyLiveView’)).
intWidth
Gets or sets the pixel width of the internal Render Texture for the live view.
intHeight
Gets or sets the pixel height of the internal Render Texture for the live view.
boolEnableHdr
Gets or sets a value indicating whether High Dynamic Range (HDR) format is enabled for the Live View.
CameraTargetCamera
Gets or sets the Unity Camera responsible for rendering content into this Live View.
RenderTextureTargetTexture
Gets or sets the specific Render Texture used as the backing store for the Live View.
uintImageHandle
Gets or sets the unique handle assigned by the native library to identify this LiveView image resource. This handle is used to notify Cohtml when the texture content has changed.
IntPtrTargetTexturePtr
Gets the native pointer to the underlying texture resource.

Protected Functions Documentation

function Awake

virtual void Awake()

function Start

virtual void Start()

function Update

virtual void Update()

function OnEnable

virtual void OnEnable()

function OnDestroy

virtual void OnDestroy()

Public Property Documentation

property LiveViewName

string LiveViewName;

Gets or sets the unique name identifier for this Live View. This name is used in the HTML to reference the image (e.g. background-image: url(‘coui://MyLiveView’)).

The unique name of the view.

property Width

int Width;

Gets or sets the pixel width of the internal Render Texture for the live view.

The width of the view in pixels.

property Height

int Height;

Gets or sets the pixel height of the internal Render Texture for the live view.

The height of the view in pixels.

property EnableHdr

bool EnableHdr;

Gets or sets a value indicating whether High Dynamic Range (HDR) format is enabled for the Live View.

true if HDR is enabled; otherwise, false.

property TargetCamera

Camera TargetCamera;

Gets or sets the Unity Camera responsible for rendering content into this Live View.

The source Camera component.

property TargetTexture

RenderTexture TargetTexture;

Gets or sets the specific Render Texture used as the backing store for the Live View.

The RenderTexture object.

property ImageHandle

uint ImageHandle;

Gets or sets the unique handle assigned by the native library to identify this LiveView image resource. This handle is used to notify Cohtml when the texture content has changed.

property TargetTexturePtr

IntPtr TargetTexturePtr;

Gets the native pointer to the underlying texture resource.

An IntPtr representing the native texture handle.