cohtml.UserImagesManager
A class that stores and manages preloaded and live view images.
Inherits from cohtml.IPreloadTextureHandable
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| UserImagesManager(CohtmlUISystem system) Constructor taking the CohtmlUISystem component which will own the preloaded assets. | |
| void | SubscribePreloadedTextureReleased() Subscribes to an event that is invoked when a preloaded texture was released by Cohtml. |
| bool | AddLiveView(string name, CohtmlLiveView liveViewComponent) Adds a CohtmlLiveView component. |
| void | ReleaseLiveViewHandle(IntPtr releasedTexturePtr) Releases and removes the image handle associated with a specific texture pointer from all active LiveView handlers, stopping it from receiving further image updates. |
| void | RemoveLiveView(string url) Removes a CohtmlLiveView component. |
| void | RemoveLiveViews() Removes all CohtmlLiveView components. |
| ResourceResponse.UserImageData | CreateLiveViewImageData(string url) Creates a native live view image data object for the provided URL. |
| ResourceResponse.UserImageData | CreateUserImageData(Texture texture, IntPtr texturePtr =default, uint imageHandle =0) =default Creates a native user image data object for the provided texture. |
| void | UpdateLiveViews() Notifies Cohtml that live view resources need to be updated. Should be invoked whenever a change in live view resources occurs. |
| bool | ContainsLiveView(string uri) Returns true if a live view exists with the given resource identifier. |
| void | AddPreloadedTexture(IntPtr texturePtr, Texture texture) Adds a preloaded texture to a dictionary collection at the given key. |
| Texture | GetPreloadedTexture(IntPtr texturePtr) Returns a preloaded texture or null if it doesn’t exist. |
| bool | ReleasePreloadedTexture(IntPtr texturePtr) Releases a preloaded texture from memory. |
| void | ReleaseAllPreloadedTextures() Releases all preloaded textures from memory. |
| void | Dispose() |
Public Properties
Section titled “Public Properties”| Name | |
|---|---|
| Dictionary< IntPtr, Texture > | PreloadedTextures A collection storing preloaded images. |
Public Functions Documentation
Section titled “Public Functions Documentation”function UserImagesManager
Section titled “function UserImagesManager”UserImagesManager( CohtmlUISystem system)Constructor taking the CohtmlUISystem component which will own the preloaded assets.
function SubscribePreloadedTextureReleased
Section titled “function SubscribePreloadedTextureReleased”void SubscribePreloadedTextureReleased()Subscribes to an event that is invoked when a preloaded texture was released by Cohtml.
function AddLiveView
Section titled “function AddLiveView”bool AddLiveView( string name, CohtmlLiveView liveViewComponent)Adds a CohtmlLiveView component.
function ReleaseLiveViewHandle
Section titled “function ReleaseLiveViewHandle”void ReleaseLiveViewHandle( IntPtr releasedTexturePtr)Releases and removes the image handle associated with a specific texture pointer from all active LiveView handlers, stopping it from receiving further image updates.
Parameters:
- releasedTexturePtr The native texture pointer to identify the LiveView to release.
function RemoveLiveView
Section titled “function RemoveLiveView”void RemoveLiveView( string url)Removes a CohtmlLiveView component.
function RemoveLiveViews
Section titled “function RemoveLiveViews”void RemoveLiveViews()Removes all CohtmlLiveView components.
function CreateLiveViewImageData
Section titled “function CreateLiveViewImageData”ResourceResponse.UserImageData CreateLiveViewImageData( string url)Creates a native live view image data object for the provided URL.
function CreateUserImageData
Section titled “function CreateUserImageData”ResourceResponse.UserImageData CreateUserImageData( Texture texture, IntPtr texturePtr =default, uint imageHandle =0) =defaultCreates a native user image data object for the provided texture.
function UpdateLiveViews
Section titled “function UpdateLiveViews”void UpdateLiveViews()Notifies Cohtml that live view resources need to be updated. Should be invoked whenever a change in live view resources occurs.
function ContainsLiveView
Section titled “function ContainsLiveView”bool ContainsLiveView( string uri)Returns true if a live view exists with the given resource identifier.
function AddPreloadedTexture
Section titled “function AddPreloadedTexture”void AddPreloadedTexture( IntPtr texturePtr, Texture texture)Adds a preloaded texture to a dictionary collection at the given key.
Parameters:
- texturePtr The pointer that will be used as a key.
- texture The texture to add.
Reimplements: cohtml.IPreloadTextureHandable.AddPreloadedTexture
function GetPreloadedTexture
Section titled “function GetPreloadedTexture”Texture GetPreloadedTexture( IntPtr texturePtr)Returns a preloaded texture or null if it doesn’t exist.
Reimplements: cohtml.IPreloadTextureHandable.GetPreloadedTexture
function ReleasePreloadedTexture
Section titled “function ReleasePreloadedTexture”bool ReleasePreloadedTexture( IntPtr texturePtr)Releases a preloaded texture from memory.
Reimplements: cohtml.IPreloadTextureHandable.ReleasePreloadedTexture
function ReleaseAllPreloadedTextures
Section titled “function ReleaseAllPreloadedTextures”void ReleaseAllPreloadedTextures()Releases all preloaded textures from memory.
function Dispose
Section titled “function Dispose”void Dispose()Public Property Documentation
Section titled “Public Property Documentation”property PreloadedTextures
Section titled “property PreloadedTextures”Dictionary< IntPtr, Texture > PreloadedTextures;A collection storing preloaded images.
© 2026 Coherent Labs. All rights reserved.