cohtml.LibraryParamsManager
A class responsible for caching and storing the LibraryParams required to create a Cohtml Library.
Public Functions
Name | |
---|---|
ILibraryParams | GetCompositeLibraryParams() |
void | CustomizeExtendedParams(ref ExtendedLibraryParams extendedLibraryParams) Invoked before initializing the native Library object so users can modify the library parameters if needed. |
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. |
TextAsset | GetJson() Reads the JSON file into a TextAsset object. |
void | Dispose() |
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 string | CohtmlLibraryParamsKey A path used to read/write a JSON file containing the LibraryParams. |
bool | EnableMemoryTracking Returns true if memory tracking is enabled. |
bool | ShouldUseCSharpBackend Returns true if the C# rendering backend should be used. |
ILibraryParams | LibraryParams Returns the native LibraryParams object. |
bool | EnableDebugger Returns true the DevTools debugger is enabled in the Unity3D Editor and Development builds. |
bool | EnableDebuggerInBuild Returns true if the DevTools debugger is enabled in all build configurations. |
int | DebuggerPort Returns the DevTools debugger port. |
Severity | LoggingSeverity 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.