cohtml.Library

A class responsible for initializing the native Cohtml Library and rendering module. Creates, destroys and manages the native Cohtml plugin objects.

Public Functions

Name
voidLoadModuleDependencies()
Loads the dependencies of the Cohtml library.
voidRestoreProcessPath()
Removes the plugin dll folder from the PATH environment variable.
voidSetDependenciesPath()
Adds the plugin dll folder to the PATH environment variable.
IUISystemCreateUISystem(ISystemSettings settings)
Creates a native IUISystem object with the provided settings.
voidExecuteCSharpBackendCommandBuffer()
Executes the C# rendering backend command buffer if enabled.
voidDispose()
The Library is disposed of after all native Systems and Views, as well as their Cohtml references and objects, have already been destroyed.
voidExecuteWork(WorkType type)
Instructs the native library to execute the provided work type.
voidScheduleWork(WorkType type)
Schedules a task with the provided work type.
voidCreateLibrary()
Initializes the native library object and its dependencies.

Public Properties

Name
UnityPluginListenerUnityPluginListener
An instance the UnityPluginListener object.
ILibraryInstance
Returns a Singleton instance of the native ILibrary object.
CompositorUnityCompositor
An instance of the Compositor object allowing the user to use features such as Compositor and Surface Partitioning.

Public Attributes

Name
boolShouldUseCSharpBackend
Returns true if the C# rendering backend should be used.
ILibraryParamsLibraryParams
Returns the native LibraryParams object.
boolIsLibraryInitialized
Returns true if the library is successfully initialized.

Public Functions Documentation

function LoadModuleDependencies

static void LoadModuleDependencies()

Loads the dependencies of the Cohtml library.

function RestoreProcessPath

static void RestoreProcessPath()

Removes the plugin dll folder from the PATH environment variable.

function SetDependenciesPath

static void SetDependenciesPath()

Adds the plugin dll folder to the PATH environment variable.

function CreateUISystem

static IUISystem CreateUISystem(
    ISystemSettings settings
)

Creates a native IUISystem object with the provided settings.

function ExecuteCSharpBackendCommandBuffer

static void ExecuteCSharpBackendCommandBuffer()

Executes the C# rendering backend command buffer if enabled.

function Dispose

static void Dispose()

The Library is disposed of after all native Systems and Views, as well as their Cohtml references and objects, have already been destroyed.

function ExecuteWork

static void ExecuteWork(
    WorkType type
)

Instructs the native library to execute the provided work type.

function ScheduleWork

static void ScheduleWork(
    WorkType type
)

Schedules a task with the provided work type.

function CreateLibrary

static void CreateLibrary()

Initializes the native library object and its dependencies.

Public Property Documentation

property UnityPluginListener

static UnityPluginListener UnityPluginListener;

An instance the UnityPluginListener object.

property Instance

static ILibrary Instance;

Returns a Singleton instance of the native ILibrary object.

property UnityCompositor

static Compositor UnityCompositor;

An instance of the Compositor object allowing the user to use features such as Compositor and Surface Partitioning.

Public Attributes Documentation

variable ShouldUseCSharpBackend

static bool ShouldUseCSharpBackend => LibraryParamsManager.ShouldUseCSharpBackend;

Returns true if the C# rendering backend should be used.

variable LibraryParams

static ILibraryParams LibraryParams => LibraryParamsManager.LibraryParams;

Returns the native LibraryParams object.

variable IsLibraryInitialized

static bool IsLibraryInitialized => s_Library != null;

Returns true if the library is successfully initialized.