UCohtmlBaseComponent
Inherits from UActorComponent
Inherited by UCohtmlComponent, UCohtmlHUD
Public Types
Section titled “Public Types”| Name | |
|---|---|
| typedef TArray< TWeakObjectPtr< UObject > > | WeakCohUIHoldersArray |
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| void | SetSoundAttenuation(const FSoundAttenuationSettings & Settings) |
| virtual void | Resize(int32 Width, int32 Height) |
| virtual void | ResizeRenderTarget(int32 Width, int32 Height) |
| bool | IsReadyToCreateView() const |
| bool | IsReadyForBindings() const |
| bool | HasRequestedView() const |
| void | ShowPaintRects(bool bShow) |
| void | Load(const FString & Path) |
| void | Reload() |
| void | DebugSaveNextFrame() |
| void | BeginDebugFrameSave() |
| void | EndDebugFrameSave() |
| void | EnableDelayedUpdate(bool bEnabled) |
| void | EnableRendering(bool bEnabled) |
| UCohtmlJSEvent * | CreateJSEvent() |
| void | TriggerJSEvent(const FString & name, UCohtmlJSEvent * eventData) const |
| void | RegisterForEvent(UPARAM(DisplayName=“UI Event Name”) FString UIEventName, UPARAM(DisplayName=“Event”) FCohtmlJSEventBPCallback Delegate) |
| void | RegisterForCustomEvent(UPARAM(DisplayName=“UI Event Name”) const FString & UIEventName, UPARAM(DisplayName=“Custom Event node Owner”) UObject * CustomEventOwner, UPARAM(DisplayName=“Custom Event node Name”) const FString & CustomEventNodeName) |
| void | CreateDataModelFromObject(const FString & Name, UObject * Model) |
| void | RemoveDataModelFromObject(UObject * Model) |
| void | CreateDataModelFromStruct(const FString & Name, const TFieldPath< FStructProperty > Struct) |
| void | UpdateWholeDataModelFromStruct(const TFieldPath< FStructProperty > Struct) const |
| void | RemoveDataModelFromStruct(const TFieldPath< FStructProperty > Struct) const |
| void | UpdateWholeDataModelFromObject(UObject * Model) const |
| void | SynchronizeModels() const |
| void | PreloadTextureSync(const FString & AssetPath) |
| void | PreloadTextureAsync(const FString & AssetPath) |
| void | AddPreloadedTexture(UTexture2D * Texture) |
| bool | RemovePreloadedTextureFromPath(const FString & AssetPath) |
| bool | RemovePreloadedTexture(UTexture2D * Texture) |
| void | RemoveAllPreloadedTextures() |
| virtual bool | EnsureMeshData(ECohtmlComponentMeshInit MeshInitialization =ECohtmlComponentMeshInit::LazyInit) |
| void | SetCohtmlTickGroup(ECohtmlTickGroup InTickGroup) |
| virtual | ~UCohtmlBaseComponent() |
| virtual void | InitializeComponent() override |
| virtual void | UninitializeComponent() override |
| virtual void | BeginDestroy() override |
| virtual bool | IsReadyForFinishDestroy() override |
| virtual void | FinishDestroy() override |
| virtual bool | GetMeshes(TArray< TWeakObjectPtr< UStaticMeshComponent >> & WeakMeshes) const |
| virtual void | TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction * ThisTickFunction) override |
| cohtml::View * | GetView() const |
| cohtml::ViewRenderer * | GetViewRenderer() const |
| FCohtmlGesturePolicy * | GetGesturePolicy() |
| FCohtmlViewWrapper * | GetViewWrapper() const |
| const FCohtmlCaretRect & | GetCaretRect() const |
| void | SetCaretRect(int x, int y, unsigned width, unsigned height) |
| virtual uint32 | GetUserIndex() |
| virtual uint32 | GetOwningPlayerID() |
| void | SetInputFocusToUI() |
| void | RestoreInputFocusFromUI(bool bForceFocusToGame =false) |
| cohtml::ECohtmlPageLoadState | GetCurrentPageState() const |
| void | SetUEViewSettings(const FCohtmlUEViewSettings & InViewSettings) |
| cohtml::IInputProxy * | GetFocusedInput() |
| DECLARE_FUNCTION(execCreateDataModelFromStruct ) | |
| DECLARE_FUNCTION(execUpdateWholeDataModelFromStruct ) | |
| DECLARE_FUNCTION(execRemoveDataModelFromStruct ) | |
| WeakCohUIHoldersArray::TIterator | GetCohUIHoldersIterator(UWorld * World) |
Protected Functions
Section titled “Protected Functions”| Name | |
|---|---|
| void | CreateView(const cohtml::ViewSettings & Info, const FString & URL) |
| virtual void | SendRenderDynamicData_Concurrent() override |
| virtual bool | RequiresGameThreadEndOfFrameUpdates() const override |
Public Attributes
Section titled “Public Attributes”| Name | |
|---|---|
| FCohtmlReadyForBindings | ReadyForBindings |
| FCohtmlScriptingReady | ScriptingReady |
| FCohtmlBindingsReleased | BindingsReleased |
| FCohtmlScriptContextCreated | ScriptContextCreated |
| FCohtmlDOMBuilt | DOMBuilt |
| FCohtmlFinishLoad | FinishLoad |
| FCohtmlLoadFailed | LoadFailed |
| FCohtmlOnNavigateTo | OnNavigateTo |
| TArray< TObjectPtr< UTexture2D > > | PreloadedTextures |
| bool | bEnableComplexCSSSupport |
| TObjectPtr< UTextureRenderTarget2D > | Texture |
| TEnumAsByte< enum TextureFilter > | Filter |
| bool | bReceiveInput |
| bool | bDelayedUpdate |
| bool | bExecuteCommandProcessingWithLayout |
| bool | bUseSurfacePartitioning |
| bool | bRunAdvanceConcurrently |
| TEnumAsByte< ECohtmlTickGroup > | TickGroup |
| TArray< FCohtmlMeshData > | MeshData |
| TArray< CohtmlDelegateFunctorWrapper > | JSEventCallbackWrappers |
| EMouseCursor::Type | CurrentMouseCursor |
Protected Attributes
Section titled “Protected Attributes”| Name | |
|---|---|
| FCohtmlUEViewSettings | UEViewSettings |
Friends
Section titled “Friends”| Name | |
|---|---|
| class | TCohtmlViewListener< UCohtmlBaseComponent > |
Public Types Documentation
Section titled “Public Types Documentation”typedef WeakCohUIHoldersArray
Section titled “typedef WeakCohUIHoldersArray”typedef TArray<TWeakObjectPtr<UObject> > UCohtmlBaseComponent::WeakCohUIHoldersArray;Public Functions Documentation
Section titled “Public Functions Documentation”function SetSoundAttenuation
Section titled “function SetSoundAttenuation”void SetSoundAttenuation( const FSoundAttenuationSettings & Settings)Sets the AttenuationSettings for the Sound Components Note: Sound is 2D by default. It can be changed to 3D if appropriate AttenuationSettings is set. for more details look at Unreal’s documentation for AttenuationSettings.
function Resize
Section titled “function Resize”virtual void Resize( int32 Width, int32 Height)Reimplemented by: UCohtmlComponent::Resize, UCohtmlHUD::Resize
Resizes the View
function ResizeRenderTarget
Section titled “function ResizeRenderTarget”virtual void ResizeRenderTarget( int32 Width, int32 Height)Resizes the texture where the View is drawn
function IsReadyToCreateView
Section titled “function IsReadyToCreateView”bool IsReadyToCreateView() constTells if the View is ready to be created
function IsReadyForBindings
Section titled “function IsReadyForBindings”bool IsReadyForBindings() constTells if the View is ready for binding operations
function HasRequestedView
Section titled “function HasRequestedView”bool HasRequestedView() constTells if a View has been scheduled for creation
function ShowPaintRects
Section titled “function ShowPaintRects”void ShowPaintRects( bool bShow)Tells the view to show/hide debug paint rectangles
function Load
Section titled “function Load”void Load( const FString & Path)Requests a new URL to be loaded in the View
function Reload
Section titled “function Reload”void Reload()Requests the View to reload the current URL
function DebugSaveNextFrame
Section titled “function DebugSaveNextFrame”void DebugSaveNextFrame()Saves next render frame to disk
function BeginDebugFrameSave
Section titled “function BeginDebugFrameSave”void BeginDebugFrameSave()Starts saving render frames to disk
function EndDebugFrameSave
Section titled “function EndDebugFrameSave”void EndDebugFrameSave()Stops saving render frames to disk
function EnableDelayedUpdate
Section titled “function EnableDelayedUpdate”void EnableDelayedUpdate( bool bEnabled)Delays UI updates until after cameras are updated. Read the section in the FAQ page of the documentation before using
function EnableRendering
Section titled “function EnableRendering”void EnableRendering( bool bEnabled)DEPRECATED: This is now controlled internally and will be removed in a few releases. Used to enable or disable the recording of rendering commands for the view.
function CreateJSEvent
Section titled “function CreateJSEvent”UCohtmlJSEvent * CreateJSEvent()Creates a UI event data that can be used when triggering event in scripting
function TriggerJSEvent
Section titled “function TriggerJSEvent”void TriggerJSEvent( const FString & name, UCohtmlJSEvent * eventData) constTrigger a Gameface UI Event
function RegisterForEvent
Section titled “function RegisterForEvent”void RegisterForEvent( UPARAM(DisplayName="UI Event Name") FString UIEventName, UPARAM(DisplayName="Event") FCohtmlJSEventBPCallback Delegate)You can use this to bind a Blueprint event to an arbitrary scripting event. The Blueprint event must have no parameters. DEPRECATED: This will be removed in future releases in favor of the new RegisterForEvent which works with any Custom Event nodes.
function RegisterForCustomEvent
Section titled “function RegisterForCustomEvent”void RegisterForCustomEvent( UPARAM(DisplayName="UI Event Name") const FString & UIEventName, UPARAM(DisplayName="Custom Event node Owner") UObject * CustomEventOwner, UPARAM(DisplayName="Custom Event node Name") const FString & CustomEventNodeName)You can use this to tie a Blueprint Custom Event node to an arbitrary View scripting event.
- Your Blueprint Custom Event node can have any number of parameters as long as they are primitive types, FString, FText, or FName.
- You don’t have to connect the Blueprint Custom Event node itself to anything, the View itself will execute it.
function CreateDataModelFromObject
Section titled “function CreateDataModelFromObject”void CreateDataModelFromObject( const FString & Name, UObject * Model)Creates a global variable (data model) in scripting from an UObject
function RemoveDataModelFromObject
Section titled “function RemoveDataModelFromObject”void RemoveDataModelFromObject( UObject * Model)Removes a global variable (data model) in scripting from a UObject
function CreateDataModelFromStruct
Section titled “function CreateDataModelFromStruct”void CreateDataModelFromStruct( const FString & Name, const TFieldPath< FStructProperty > Struct)Creates a global variable (data model) in scripting from a UStruct
function UpdateWholeDataModelFromStruct
Section titled “function UpdateWholeDataModelFromStruct”void UpdateWholeDataModelFromStruct( const TFieldPath< FStructProperty > Struct) constMarks a Struct model for update. The UI using this data model will be updated during the next call to SynchronizeModels. For optimum performance, call SynchronizeModels as rarely as possible (e.g. once per frame).
function RemoveDataModelFromStruct
Section titled “function RemoveDataModelFromStruct”void RemoveDataModelFromStruct( const TFieldPath< FStructProperty > Struct) constRemoves a global variable (data model) in scripting from a UStruct
function UpdateWholeDataModelFromObject
Section titled “function UpdateWholeDataModelFromObject”void UpdateWholeDataModelFromObject( UObject * Model) constMarks an Object model for update. The UI using this data model will be updated during the next call to SynchronizeModels. For optimum performance, call SynchronizeModels as rarely as possible (e.g. once per frame).
function SynchronizeModels
Section titled “function SynchronizeModels”void SynchronizeModels() constSynchronize all models marked for update.
function PreloadTextureSync
Section titled “function PreloadTextureSync”void PreloadTextureSync( const FString & AssetPath)Loads a Texture Synchronously (BLOCKING the main thread) from asset Path. Once loaded, the Texture will be added to the PreloadedTextures collection. This is useful for ensuring that the requests for UE4 textures will be working over already loaded assets, leading to fast response times.
function PreloadTextureAsync
Section titled “function PreloadTextureAsync”void PreloadTextureAsync( const FString & AssetPath)Loads a Texture Asynchronously from asset Path. Once loaded, the Texture will be added to the PreloadedTextures collection. This is useful for ensuring that the requests for UE4 textures will be working over already loaded assets, leading to fast response times.
function AddPreloadedTexture
Section titled “function AddPreloadedTexture”void AddPreloadedTexture( UTexture2D * Texture)Adds an already loaded Texture to the PreloadedTextures collection. This is useful for ensuring that the requests for UE4 textures will be working over already loaded assets, leading to fast response times.
function RemovePreloadedTextureFromPath
Section titled “function RemovePreloadedTextureFromPath”bool RemovePreloadedTextureFromPath( const FString & AssetPath)Removes a Texture from the PreloadedTextures collection. This can be used when you no longer need a specific texture inside the collection to be kept loaded, for example after changing URL and View is fully loaded. Note: The removal of elements is an operation with linear complexity, consider using RemoveAllPreloadedTextures instead. Note: Upon destruction of the CohtmlBaseComponent, PreloadedTextures collection will be cleared automatically, so calling this method isn’t mandatory.
function RemovePreloadedTexture
Section titled “function RemovePreloadedTexture”bool RemovePreloadedTexture( UTexture2D * Texture)Removes a Texture from the PreloadedTextures collection. This can be used when you no longer need a specific texture inside the collection to be kept loaded, for example after changing URL and View is fully loaded. Note: The removal of elements is an operation with linear complexity, consider using RemoveAllPreloadedTextures instead. Note: Upon destruction of the CohtmlBaseComponent, PreloadedTextures collection will be cleared automatically, so calling this method isn’t mandatory.
function RemoveAllPreloadedTextures
Section titled “function RemoveAllPreloadedTextures”void RemoveAllPreloadedTextures()Removes all Textures from the PreloadedTextures collection. This can be used when you no longer need any of the textures inside the collection to be kept loaded, for example after changing URL and View is fully loaded. Note: Upon destruction of the CohtmlBaseComponent, PreloadedTextures collection will be cleared automatically, so calling this method isn’t mandatory.
function EnsureMeshData
Section titled “function EnsureMeshData”virtual bool EnsureMeshData( ECohtmlComponentMeshInit MeshInitialization =ECohtmlComponentMeshInit::LazyInit)Used for specifying when the mesh needs to be ready to receive input. If left unspecified, the mesh will be loaded lazily, which means it will take between 2-4 frames for the render thread to have it available. If set to “Immediate”, the render state will be flagged as dirty and the mesh will be loaded either on the same frame or at most the next. Note: Call manually right after a component’s creation to guarantee that all input will be handled in the first frames.
function SetCohtmlTickGroup
Section titled “function SetCohtmlTickGroup”void SetCohtmlTickGroup( ECohtmlTickGroup InTickGroup)Use this over the native UActorComponent::SetTickGroup during runtime to change the TickGroup. This method will essentially do the same, but also perform extra plugin-related checks, updates, etc.
function ~UCohtmlBaseComponent
Section titled “function ~UCohtmlBaseComponent”virtual ~UCohtmlBaseComponent()function InitializeComponent
Section titled “function InitializeComponent”virtual void InitializeComponent() overrideReimplemented by: UCohtmlComponent::InitializeComponent, UCohtmlHUD::InitializeComponent
function UninitializeComponent
Section titled “function UninitializeComponent”virtual void UninitializeComponent() overridefunction BeginDestroy
Section titled “function BeginDestroy”virtual void BeginDestroy() overridefunction IsReadyForFinishDestroy
Section titled “function IsReadyForFinishDestroy”virtual bool IsReadyForFinishDestroy() overridefunction FinishDestroy
Section titled “function FinishDestroy”virtual void FinishDestroy() overridefunction GetMeshes
Section titled “function GetMeshes”virtual bool GetMeshes( TArray< TWeakObjectPtr< UStaticMeshComponent >> & WeakMeshes) constReimplemented by: UCohtmlComponent::GetMeshes
function TickComponent
Section titled “function TickComponent”virtual void TickComponent( float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction * ThisTickFunction) overrideReimplemented by: UCohtmlComponent::TickComponent, UCohtmlHUD::TickComponent
function GetView
Section titled “function GetView”cohtml::View * GetView() constfunction GetViewRenderer
Section titled “function GetViewRenderer”cohtml::ViewRenderer * GetViewRenderer() constfunction GetGesturePolicy
Section titled “function GetGesturePolicy”FCohtmlGesturePolicy * GetGesturePolicy()function GetViewWrapper
Section titled “function GetViewWrapper”inline FCohtmlViewWrapper * GetViewWrapper() constfunction GetCaretRect
Section titled “function GetCaretRect”const FCohtmlCaretRect & GetCaretRect() constfunction SetCaretRect
Section titled “function SetCaretRect”void SetCaretRect( int x, int y, unsigned width, unsigned height)function GetUserIndex
Section titled “function GetUserIndex”inline virtual uint32 GetUserIndex()Reimplemented by: UCohtmlComponent::GetUserIndex, UCohtmlHUD::GetUserIndex
function GetOwningPlayerID
Section titled “function GetOwningPlayerID”inline virtual uint32 GetOwningPlayerID()Reimplemented by: UCohtmlHUD::GetOwningPlayerID
function SetInputFocusToUI
Section titled “function SetInputFocusToUI”void SetInputFocusToUI()function RestoreInputFocusFromUI
Section titled “function RestoreInputFocusFromUI”void RestoreInputFocusFromUI( bool bForceFocusToGame =false)function GetCurrentPageState
Section titled “function GetCurrentPageState”cohtml::ECohtmlPageLoadState GetCurrentPageState() constfunction SetUEViewSettings
Section titled “function SetUEViewSettings”void SetUEViewSettings( const FCohtmlUEViewSettings & InViewSettings)function GetFocusedInput
Section titled “function GetFocusedInput”cohtml::IInputProxy * GetFocusedInput()function DECLARE_FUNCTION
Section titled “function DECLARE_FUNCTION”DECLARE_FUNCTION( execCreateDataModelFromStruct)function DECLARE_FUNCTION
Section titled “function DECLARE_FUNCTION”DECLARE_FUNCTION( execUpdateWholeDataModelFromStruct)function DECLARE_FUNCTION
Section titled “function DECLARE_FUNCTION”DECLARE_FUNCTION( execRemoveDataModelFromStruct)function GetCohUIHoldersIterator
Section titled “function GetCohUIHoldersIterator”static WeakCohUIHoldersArray::TIterator GetCohUIHoldersIterator( UWorld * World)Protected Functions Documentation
Section titled “Protected Functions Documentation”function CreateView
Section titled “function CreateView”void CreateView( const cohtml::ViewSettings & Info, const FString & URL)function SendRenderDynamicData_Concurrent
Section titled “function SendRenderDynamicData_Concurrent”virtual void SendRenderDynamicData_Concurrent() overridefunction RequiresGameThreadEndOfFrameUpdates
Section titled “function RequiresGameThreadEndOfFrameUpdates”inline virtual bool RequiresGameThreadEndOfFrameUpdates() const overridePublic Attributes Documentation
Section titled “Public Attributes Documentation”variable ReadyForBindings
Section titled “variable ReadyForBindings”FCohtmlReadyForBindings ReadyForBindings;Fired when the View is ready for binding events. Any event bound prior to this will be ignored
variable ScriptingReady
Section titled “variable ScriptingReady”FCohtmlScriptingReady ScriptingReady;Fired when the View’s document is fully loaded and the “ready for bindings” event has completed
variable BindingsReleased
Section titled “variable BindingsReleased”FCohtmlBindingsReleased BindingsReleased;Fired when the View has released its bindings.
variable ScriptContextCreated
Section titled “variable ScriptContextCreated”FCohtmlScriptContextCreated ScriptContextCreated;Called immediately after the View’s script context has been created for the page. This happens before starting to build the DOM. You can execute any scripts that will influence DOM creation here.
variable DOMBuilt
Section titled “variable DOMBuilt”FCohtmlDOMBuilt DOMBuilt;Called when the View’s DOM for the pages is fully constructed, but the referenced resources may not finish loading.
variable FinishLoad
Section titled “variable FinishLoad”FCohtmlFinishLoad FinishLoad;Called when a View’s navigation change request failed.
variable LoadFailed
Section titled “variable LoadFailed”FCohtmlLoadFailed LoadFailed;Called when the View’s page, including the resources it refers to, is completely loaded and initialized.
variable OnNavigateTo
Section titled “variable OnNavigateTo”FCohtmlOnNavigateTo OnNavigateTo;Called whenever the View is about to navigate to a different URL. You can return false to stop the navigation to the URL.
variable PreloadedTextures
Section titled “variable PreloadedTextures”TArray< TObjectPtr< UTexture2D > > PreloadedTextures;PreloadedTextures collection, keeping the Textures loaded and ready for use. Ideally, the Textures are to be loaded ahead of time and kept in this collection for ensuring that the requests for UE4 textures will be working over already loaded assets, leading to fast response times.
variable bEnableComplexCSSSupport
Section titled “variable bEnableComplexCSSSupport”bool bEnableComplexCSSSupport;Whether to enable support for complex CSS selectors (e.g. div > p, div ~ p)
variable Texture
Section titled “variable Texture”TObjectPtr< UTextureRenderTarget2D > Texture;Gives access to the UI Texture
variable Filter
Section titled “variable Filter”TEnumAsByte< enum TextureFilter > Filter;variable bReceiveInput
Section titled “variable bReceiveInput”bool bReceiveInput;Indicates whether input is forwarded to this view
variable bDelayedUpdate
Section titled “variable bDelayedUpdate”bool bDelayedUpdate;Changes this component’s tick group to TG_PostUpdateWork and sends bindings before drawing. For more information refer to the FAQ section of the documentation.
variable bExecuteCommandProcessingWithLayout
Section titled “variable bExecuteCommandProcessingWithLayout”bool bExecuteCommandProcessingWithLayout;Tells the View to process all collected front-end commands right after the layout execution on the same thread. Note: This option is mandatory when using the Custom Effects and/or the Compositor API features. Note: When this setting is enabled, the rendering library will be used on two different threads: the Game Thread and the Render Thread. Normally the library will detect that but if you have a use case where Game Thread and Rendering tasks are to be executed on the same thread, you’ll have to enable the multithreaded awareness manually by setting LibraryParams::AllowMultithreadedCommandProcessing in the Coherent Rendering plugin to true.
variable bUseSurfacePartitioning
Section titled “variable bUseSurfacePartitioning”bool bUseSurfacePartitioning;Enables the Surface Partitioning mode, which does not create a texture for your view, but instead draws separate parts of the HTML in separate small textures. Useful when you have a view with a high resolution that is mostly empty, apart from some content in the corners of the screen that you can draw separately, omitting the big screen texture that you would have otherwise.
variable bRunAdvanceConcurrently
Section titled “variable bRunAdvanceConcurrently”bool bRunAdvanceConcurrently;When enabled, forces cohtml::View::Advance to be scheduled on background tasks, reducing the load on the Game Thread. This imposes restrictions on what View operations can be performed on the Game Thread. Please see the documentation for more details.
variable TickGroup
Section titled “variable TickGroup”TEnumAsByte< ECohtmlTickGroup > TickGroup;Sets the tick group in which this component will be ticked and Advance the View. If set to “No tick”, this component will not tick on its own. You are expected to call its Tick function manually from your own code. Useful if you want to control the exact time at which to Advance the View.
variable MeshData
Section titled “variable MeshData”TArray< FCohtmlMeshData > MeshData;variable JSEventCallbackWrappers
Section titled “variable JSEventCallbackWrappers”TArray< CohtmlDelegateFunctorWrapper > JSEventCallbackWrappers;variable CurrentMouseCursor
Section titled “variable CurrentMouseCursor”EMouseCursor::Type CurrentMouseCursor;Protected Attributes Documentation
Section titled “Protected Attributes Documentation”variable UEViewSettings
Section titled “variable UEViewSettings”FCohtmlUEViewSettings UEViewSettings;Friends
Section titled “Friends”friend TCohtmlViewListener< UCohtmlBaseComponent >
Section titled “friend TCohtmlViewListener< UCohtmlBaseComponent >”friend class TCohtmlViewListener< UCohtmlBaseComponent >;© 2026 Coherent Labs. All rights reserved.