Skip to content
SiteEmail

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

Name
virtual voidAwake()
virtual voidStart()
virtual voidUpdate()
virtual voidOnEnable()
virtual voidOnDestroy()
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.
virtual void Awake()
virtual void Start()
virtual void Update()
virtual void OnEnable()
virtual void OnDestroy()
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.

int Width;

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

The width of the view in pixels.

int Height;

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

The height of the view in pixels.

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.

Camera TargetCamera;

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

The source Camera component.

RenderTexture TargetTexture;

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

The RenderTexture object.

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.

IntPtr TargetTexturePtr;

Gets the native pointer to the underlying texture resource.

An IntPtr representing the native texture handle.