cohtml.LibraryParamsManager

A class responsible for caching and storing the LibraryParams required to create a Cohtml Library.

Public Functions

Name
ILibraryParamsGetCompositeLibraryParams()
voidCustomizeExtendedParams(ref ExtendedLibraryParams extendedLibraryParams)
Invoked before initializing the native Library object so users can modify the library parameters if needed.
ExtendedLibraryParamsGetJsonParamsOrDefault()
Reads the library params from a JSON file if it exists and caches them. Subsequent calls to this method returns cached library params. If no library params were stored in JSON format, default ones are created and cached.
TextAssetGetJson()
Reads the JSON file into a TextAsset object.
voidDispose()

Public Properties

Name
Func< ExtendedLibraryParams, ExtendedLibraryParams >OnCustomizeExtendedParams
Invoked before initializing the native Library object so users can modify the library parameters if needed.

Public Attributes

Name
const stringCohtmlLibraryParamsKey
A path used to read/write a JSON file containing the LibraryParams.
boolEnableMemoryTracking
Returns true if memory tracking is enabled.
boolShouldUseCSharpBackend
Returns true if the C# rendering backend should be used.
ILibraryParamsLibraryParams
Returns the native LibraryParams object.
boolEnableDebugger
Returns true the DevTools debugger is enabled in the Unity3D Editor and Development builds.
boolEnableDebuggerInBuild
Returns true if the DevTools debugger is enabled in all build configurations.
intDebuggerPort
Returns the DevTools debugger port.
SeverityLoggingSeverity
Returns the logging severity of the Cohtml Library parameters.

Public Functions Documentation

function GetCompositeLibraryParams

static ILibraryParams GetCompositeLibraryParams()

function CustomizeExtendedParams

static void CustomizeExtendedParams(
    ref ExtendedLibraryParams extendedLibraryParams
)

Invoked before initializing the native Library object so users can modify the library parameters if needed.

Parameters:

  • extendedLibraryParams A reference to the object you want to modify.

function GetJsonParamsOrDefault

static ExtendedLibraryParams GetJsonParamsOrDefault()

Reads the library params from a JSON file if it exists and caches them. Subsequent calls to this method returns cached library params. If no library params were stored in JSON format, default ones are created and cached.

function GetJson

static TextAsset GetJson()

Reads the JSON file into a TextAsset object.

function Dispose

static void Dispose()

Public Property Documentation

property OnCustomizeExtendedParams

static Func< ExtendedLibraryParams, ExtendedLibraryParams > OnCustomizeExtendedParams;

Invoked before initializing the native Library object so users can modify the library parameters if needed.

Public Attributes Documentation

variable CohtmlLibraryParamsKey

const string CohtmlLibraryParamsKey = "Configuration/LibraryParams";

A path used to read/write a JSON file containing the LibraryParams.

variable EnableMemoryTracking

static bool EnableMemoryTracking => GetJsonParamsOrDefault().EnableMemoryTracking;

Returns true if memory tracking is enabled.

variable ShouldUseCSharpBackend

static bool ShouldUseCSharpBackend => GetJsonParamsOrDefault().UseCSharpRenderingBackend;

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

variable LibraryParams

static ILibraryParams LibraryParams => GetJsonParamsOrDefault().Params;

Returns the native LibraryParams object.

variable EnableDebugger

static bool EnableDebugger => GetJsonParamsOrDefault().EnableDebugger;

Returns true the DevTools debugger is enabled in the Unity3D Editor and Development builds.

variable EnableDebuggerInBuild

static bool EnableDebuggerInBuild => GetJsonParamsOrDefault().EnableDebuggerInBuild;

Returns true if the DevTools debugger is enabled in all build configurations.

variable DebuggerPort

static int DebuggerPort => GetJsonParamsOrDefault().DebuggerPort;

Returns the DevTools debugger port.

variable LoggingSeverity

static Severity LoggingSeverity => GetJsonParamsOrDefault().LoggingSeverity;

Returns the logging severity of the Cohtml Library parameters.