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 void | Awake() |
| virtual void | Start() |
| virtual void | Update() |
| virtual void | OnEnable() |
| virtual void | OnDestroy() |
Public Properties
| Name | |
|---|---|
| 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’)). |
| int | Width Gets or sets the pixel width of the internal Render Texture for the live view. |
| int | Height Gets or sets the pixel height of the internal Render Texture for the live view. |
| bool | EnableHdr Gets or sets a value indicating whether High Dynamic Range (HDR) format is enabled for the Live View. |
| Camera | TargetCamera Gets or sets the Unity Camera responsible for rendering content into this Live View. |
| RenderTexture | TargetTexture Gets or sets the specific Render Texture used as the backing store for the Live View. |
| 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. |
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.