CRIWARE Unity Plugin Manual  Last Updated: 2024-07-12
FAQ & Troubleshooting
If you have questions or issues with the Asset Support Add-on, please refer to the following:

CI build fails

If DllNotFoundException or entryPointNotFoundException messages appear

If DllNotFoundException occurs on Linux, please refer to When a DllNotFoundException occurs on Linux .

If the issue cannot be resolved, it may be due to the permissions of the plugin libraries.
First check the status of the libraries under Assets/CRIMW/CriWare/Runtime/Platforms/ in your CI environment.
Note that when acquiring a Unity project from the Version Control system during a build, the library files may be changed to have no execution permissions.
In this case, after getting the project and before launching Unity, please modify the permissions of the library files.

If the issue is due to CriManaUsmAssetImporter, you can disable [Import Movie Info] for the USM assets to deny the DLL "Execute" permission.
However, note that if [Import Movie Info] is disabled, CriManaUsmAsset.MovieInfo may have an invalid value.

If the Build Device is Running Out of Memory

In the previous CRI Addressables versions, there was an issue where a large number of assets in the project were loaded when the bundle was being built.
This issue has been fixed in CRI Addressables 0.6.05. Therfore, if you are using an older version, please update to a more recent version.

Unable to play back Assets with CRI Addressables

Please check the following:

Whether there is any direct reference from Built-in Scenes

CRI assets managed by CRI Addressables must be loaded via the Addressables API
  • Addressables.LoadAssetAsync , etc.
When referencing CRI assets via the built-in scenes or via "Prefabs" that are referenced by built-in scenes, the data cannot be loaded as the "Non-asset" data for the CRI assets does not exist.

Also, managing assets by Addressables that are referenced via built-in scenes can lead to unnecessary duplication of data, so it is not recommended to use the Addressables Asset System in this case.

The "Addressables Analyze" tool can be used to check whether these invalid references exist.

Whether it is referenced from the "Resource" folder

Similarly, the playback may be affected when assets are loaded from the Resource folder or a dependent destination.
Therefore, we recommend you to use Addressables to manage assets instead of the Resource folder.

Specifying "DeployType" from the script

You can change the DeployType by using CriWare.Assets.CriAssetImporter.implementation.
The following example shows that the DeployType is automatically set as "AssetPostprocessor".
public class MyCriAssetPostprocessor : UnityEditor.AssetPostprocessor
{
void OnPreprocessAsset()
{
CriAssetImporter importer = assetImporter as CriAssetImporter;
if (importer == null) return; // return if it is not a CRI Asset
// This example specifies a different DeployType depending on the extension
var extension = System.IO.Path.GetExtension(assetImporter.assetPath);
if (extension == ".acf" || extension == ".acb") // OnMemory
importer.implementation = new CriSerializedBytesAssetImplCreator();
if(extension ==".awb" || extension == ".usm") // Addressables
importer.implementation = new CriCustomAddressableAssetImplCreator(CriAddressablesSetting.Instance.Remote);
}
}
The CriWare.Assets.CriAssetImporter.implementation specifies an instance that inherits from CriWare.Assets.ICriAssetImplCreator.
The following three types are available for the implementation of CRI Assets/CRI Addressables.
Note that the new DeployType is reflected when the Asset is re-imported after changing the CriWare.Assets.CriAssetImporter.implementation .
After performing operations using AssetPostprocessor, a re-import is performed immediately. However, if you want to do it at a specific time, please re-import with the following code:
EditorUtility.SetDirty(importer);
importer.SaveAndReimport();

Types of assets registered with Addressables

When using the CRI Addressables, you can either register the CRI Assets to an Addressable Group or not.

When loading after specifying the address of CRI Asset

When loading a single CRI asset via Addressables, register it directly in any AddressableGroup.

For loading assets depending on the CRI Assets

CRI assets do not need to be registered with Addressables if they are referenced from prefabs or scenes.
Therefore, you only need to register the scene of the reference source or asset to the AddressableGroup, and the CRI asset will be loaded once its reference source asset is loaded.

AWB Asset

AWB Assets are always referenced via ACB Assets.
Therefore, if ACB assets can be loaded, you do not need to register the AWB assets via Addressables.