CRIWARE Unity Plugin Manual  Last Updated: 2024-07-12
Common Class Reference

A class which provides auxiliary functions related to the CRIWARE plug-in. More...

Classes

struct  CpuUsage
 CPU usage of the CRIWARE plug-in More...
 

Static Public Member Functions

static bool IsStreamingAssetsPath (string path)
 Determines whether it is used as a relative path from the StreamingAssets folder More...
 
static string GetScriptVersionString ()
 Gets script version string More...
 
static int GetBinaryVersionNumber ()
 Gets the binary version number More...
 
static int GetRequiredBinaryVersionNumber ()
 Gets the binary version required by the script More...
 
static bool CheckBinaryVersionCompatibility ()
 Checks the consistency between binary version and script version More...
 
static uint GetFsMemoryUsage ()
 Gets the memory usage of CRI FileSystem More...
 
static uint GetAtomMemoryUsage ()
 Gets the memory usage of CRI Atom More...
 
static uint GetManaMemoryUsage ()
 Gets the memory usage of CRI Mana More...
 
static CpuUsage GetAtomCpuUsage ()
 Gets the CPU usage of the CRIWARE plug-in More...
 

Public Attributes

const bool supportsCriFsInstaller
 Whether CriFsInstaller API is supported or not More...
 
const bool supportsCriFsWebInstaller
 Whether CriFsWebInstaller API is supported or not More...
 

Properties

static string streamingAssetsPath [get]
 The path of the StreamingAssets folder. More...
 
static string installTargetPath [get]
 The path of the data folder. More...
 
static string installCachePath [get]
 The path of the cache data folder. More...
 

Detailed Description

A class which provides auxiliary functions related to the CRIWARE plug-in.

Description:
Provides an auxiliary method that can be commonly used in platforms.
By using the properties and methods of this class, you can get a path to a special data folder or check the CPU /memory usage by CRIWARE plug-in.

Member Function Documentation

static bool IsStreamingAssetsPath ( string  path)
inlinestatic

Determines whether it is used as a relative path from the StreamingAssets folder

Parameters
pathFile path
Returns
Whether it is used as a relative path from the StreamingAssets folder
Description:
Determines whether the path is used as a relative path from the StreamingAssets folder in the CRIWARE plug-in.
The CRIWARE plug-in uses the path that meets all the following conditions as a relative path from the StreamingAssets folder.
  • Is not an absolute path
  • Does not contain ':'
Note:
Refer to the reference of each API to see if it is actually used as a relative path from the StreamingAssets folder.
static string GetScriptVersionString ( )
inlinestatic

Gets script version string

Description:
This method returns the script version string of CRIWARE.
static int GetBinaryVersionNumber ( )
inlinestatic

Gets the binary version number

Description:
This method returns the binary version number of CRIWARE. The binary here means the library file (.dll etc.) included in the CRIWARE plug-in.
static int GetRequiredBinaryVersionNumber ( )
inlinestatic

Gets the binary version required by the script

Description:
This method returns the runtime version number required by the CRIWARE script.
static bool CheckBinaryVersionCompatibility ( )
inlinestatic

Checks the consistency between binary version and script version

Description:
This method checks if the current binary matches the version number required by the script.
If they match, the integrity check is considered successful and True is returned.
If they don't match, it is considered as a failure, an error message is output to the console, and False is returned.
static uint GetFsMemoryUsage ( )
inlinestatic

Gets the memory usage of CRI FileSystem

Description:
This method returns the memory usage of CRI FileSystem.
static uint GetAtomMemoryUsage ( )
inlinestatic

Gets the memory usage of CRI Atom

Description:
This method returns the memory usage of CRI Atom.
static uint GetManaMemoryUsage ( )
inlinestatic

Gets the memory usage of CRI Mana

Description:
This method returns the memory usage of CRI Mana.
static CpuUsage GetAtomCpuUsage ( )
inlinestatic

Gets the CPU usage of the CRIWARE plug-in

Description:
This method returns the CPU usage by the native library of CRIWARE plug-in. The return value is a CpuUsage structure.

Member Data Documentation

const bool supportsCriFsInstaller
Initial value:
=
#if UNITY_EDITOR || UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN || UNITY_IOS || UNITY_TVOS || UNITY_ANDROID || UNITY_WINRT
true

Whether CriFsInstaller API is supported or not

Description:
Used to determine if the CriFsInstaller API is available on the execution environment.
const bool supportsCriFsWebInstaller
Initial value:
=
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX || UNITY_IOS || UNITY_ANDROID
true

Whether CriFsWebInstaller API is supported or not

Description:
Used to determine if the CriFsWebInstaller API is available on the execution environment.

Property Documentation

string streamingAssetsPath
staticget

The path of the StreamingAssets folder.

Description:
This property returns the StreamingAssets folder path. The value cannot be set.
Note:
In Android environment, this property returns an empty string. When accessing the files in StreamingAssets using the function of the CRIWARE plug-in, directly specify the relative path below StreamingAssets in Android environment only. Note that "/" is not added to the beginning of the path.
string installTargetPath
staticget

The path of the data folder.

Description:
This property returns the data folder path. The value cannot be set.
Note:
In the case of iOS environment, writing files in this folder may cause problems in AppStore examination.
string installCachePath
staticget

The path of the cache data folder.

Description:
Returns the path of the cache data folder.
The files under the directory returned by this property are writable (from the application).
Note:
Returns a path which may not be persistent on some platforms.
Whether the path returned by this property is persistent depends on whether AssetBundle caching is enabled / disabled for each platform.

The documentation for this class was generated from the following file: