CRIWARE Unity Plugin Manual
Last Updated: 2025-05-08
Loading WebGL version ADX data
Loading Data
In the WebGL target, the loading process may be asynchronous depending on the path of the file you are loading.
It is not possible to play the video until asynchronous loading is complete.
If you call Start() on a Cue immediately after calling CriWare.CriAtom::AddCueSheet , an error may occur.
For more information, please also see FileMajik PRO for Web .
For remote file paths
This applies when the file path starts with http or https and the file is placed in StreamingAssets . In a WebGL environment, Application.streamingAssetsPath returns the URL of the application's server address. CriWare.CriAtom.AddCueSheet can be loaded by simply specifying the URL.
The loading process is asynchronous, so you must wait for it to complete.
If you try to play the video before it has finished loading, an error will be displayed.
For local file paths
This occurs when you specify a file path that begins with "/".
In this case, the file resides in the Emscripten memory filesystem used by Unity and can be loaded synchronously.
This also includes data written to Application.persistentDataPath and Application.temporaryCachePath in the WebGL environment.
Therefore, it may be possible to download the data on the server in advance using UnityWebRequest or similar.
This also applies to resources retrieved via CRI Addressables. When the asynchronous API in Addressables is completed, it is written to the memory file system. It can be loaded using synchronous APIs such as CriAtomAcbAsset.LoadImmediate.