Skip to content
SiteEmail

cohtml.LibraryParamsManager

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

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()
Name
Func< ExtendedLibraryParams, ExtendedLibraryParams >OnCustomizeExtendedParams
Invoked before initializing the native Library object so users can modify the library parameters if needed.
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.
static ILibraryParams GetCompositeLibraryParams()
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.
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.

static TextAsset GetJson()

Reads the JSON file into a TextAsset object.

static void Dispose()
static Func< ExtendedLibraryParams, ExtendedLibraryParams > OnCustomizeExtendedParams;

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

const string CohtmlLibraryParamsKey = "Configuration/LibraryParams";

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

static bool EnableMemoryTracking => GetJsonParamsOrDefault().EnableMemoryTracking;

Returns true if memory tracking is enabled.

static bool ShouldUseCSharpBackend => GetJsonParamsOrDefault().UseCSharpRenderingBackend;

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

static ILibraryParams LibraryParams => GetJsonParamsOrDefault().Params;

Returns the native LibraryParams object.

static bool EnableDebugger => GetJsonParamsOrDefault().EnableDebugger;

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

static bool EnableDebuggerInBuild => GetJsonParamsOrDefault().EnableDebuggerInBuild;

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

static int DebuggerPort => GetJsonParamsOrDefault().DebuggerPort;

Returns the DevTools debugger port.

static Severity LoggingSeverity => GetJsonParamsOrDefault().Params.LoggingFilters.MinimumSeverity;

Returns the logging severity of the Cohtml Library parameters.