CRIWARE Unity Plugin Manual  Last Updated: 2024-07-12
Importing the assets
Files with extensions supported by the Asset Support Add-on can be imported as Unity assets.
Files can be allocated in any folder in the project.

Attention
If the file name includes full-width characters (like in Japanese), the file may not be loaded correctly (depending on the DeployType or the environment).
It is recommended to avoid using file names that include full-width characters.

Setting the \"Deploy Type\"

Select the imported files in the Editor to set the Deploy Type in the Inspector.
"Deploy Type" determines the actual location of the data of the Asset.
Adjust the settings according to the file loading method used for the runtime.
addon4u_assetsupport_deploytype.png
Settings the "Deploy Type"

Differences based on the value of the Deploy Type
Type Allocating the actual data Data with the recommended settings
StreamingAssets<br>(Default) Copied to the StreamingAssets folder,
and included in the built binaries.
Data included in the built binaries,
such as the ACB/AWB files for SE/BGM of the audio system.
OnMemory Included in the asset. ACF, and ACB used for additional downloads.
Addressables (Local) Located at the path set in the Addressable Asset System. AWB, USM managed via Addressables.
Addressables (Remote) Located at the RemoteBuildPath set in the Addressable Asset System. Note: option only retained for compatibility. It is recommended to use Addressables instead.
Addressables (Local) Located at the LocalBuildPath set in the Addressable Asset System. Note: option only retained for compatibility. The data being managed by Addressables.
StreamingAssets
For CRI Assets that have "StreamingAssets" set, the corresponding Non-Asset CRI data is copied into the StreamingAssets folder during the build, and is included in the binary.
The data placed in StreamingAssets will be removed after the build.
If an application is not using a server but all assets are set this way, on-memory loading / streaming playback will work correctly, according to the file type.
OnMemory
When "OnMemory" is set, the actual data is included as a byte string in the asset itself.
Therefore, the actual data of the file is expanded in-memory whenever the asset is loaded.
This setting can be used with Addressable.
Since the ACF and ACB data is expanded in-memory at registration time in ADX, it is recommended to use the "OnMemory" setting.
However, you cannot use this setting for an AWB (which contains the waveforms for streaming playback).
Attention
It means that if an Asset with an "OnMemory" Deploy Type is loaded multiple times directly from the AssetBundle instead of using the Addressables, the same data will be duplicated in memory.
When not using the Addressable Asset System, please implement a caching mechanism to avoid redundant loading.
Addressables
For CRI assets with "Addressables" set, the corresponding Non-Asset CRI data is placed in the BuildPath for each group during the build of the Addressable Asset System.
When loading, the Asset itself and the Non-Asset CRI data are downloaded.
For details, refer to How to use CRI Addressables [Below 0.7.00] .

Adding a custom \"Deploy Type\"

You can add a "DeployType" by creating a class that implements the ICriAssetImplCreator interface.
This makes it possible to use CRI assets with your own resource management system.
For details, refer to [Asset Support] DeployType extension .