CRI Assets for Unity
Recent versions of the CRIWARE Unity Plug-in include the new Asset Support Add-on. This add-on allows for the data generated by the CRIWARE tools to be used as regular Unity assets, which improves both workflow and asset management.
The add-on is provided as a Unity package, so the installation is straightforward:
- Locate the cri_asset_support_addon.unitypackage in the Unity plugin folder, normally under \Addons\asset_support\plugin.
- Then in Unity, go to Assets, Import Package, Custom Package, and import the Unity package.
- This will add CriAssets and CriAddressables folders in your Unity project under CRIMW.
Note that the Asset Support Add-on only works with the following environments:
- Unity 2019.4.0f1 or later
- Unity Addressable Asset System 1.8.5 or later
The Add-on also adds CRI’s own Scripted Importer, so conflicts may arise if you already have implemented your own importer for Criware-related files (such as ACF, ACB, AWB, USM).
With the Asset Support Add-on installed you can now import ACF, ACB, AWB, and USM files as Unity assets.
These assets do not have to be located in the StreamingAssets folder anymore. From now on, assets can be imported anywhere under the Unity Assets folder. This also means that when building CueSheet binaries from Atom Craft, they can be exported directly into the Unity project folder, and automatically will appear as Unity assets. Therefore, it is now possible to maintain a custom folder hierarchy for the audio assets, which simplifies their import and management during the production cycle.
Assets with the .acf / .acb / .awb / .usm extensions have also access to new settings in the Inspector.
For every type of asset, the Deploy Type setting determines the actual location of the data:
- StreamingAssets (Default) – Copy the assets in the StreamingAssets folder and include them in the built binaries. The data placed in StreamingAssets will be removed after the build.
- OnMemory – Allow the inclusion of the assets in an AssetBundle without using the addressable system, which is convenient for downloadable content (DLC).
- Addressables – Use the Unity Addressable Asset System to manage the data.
Note that it is also possible to create a custom Deploy Type that implements the ICriAssetImplCreator interface for your own resource management system.
In addition, all the Cues included in the CueSheet of an ACB are now browsable and playable. AWB can also be linked directly from the ACB if needed.
For the USM files used by Softdec2, Loop, Additive, Ambisonics options are also available.
Finally, two new types of assets dedicated to multi-platform and/or multi-lingual projects can be created:
- Multi-Platform ACB / ACF / USM – These multi-platform assets reference the various versions of an ACB, ACF or USM required for all the platforms targeted by the project. By using this type of asset, only the ACB, ACF or USM corresponding to the platform you are building for will be included in the binary.
- Multi-Lingual ACB – This asset references all the ACB used for the different languages, making it easy to switch languages in the application. This asset can also reference the ACB from other platforms.
CRI Assets use dedicated components to load the different types of Unity assets. Although the components themselves are different, their usage is similar to standard ones:
- Cri Atom Assets – Component to manage the loading of ACF/ACB.
- Cri Atom Source For Asset – Component of a sound source
Cri Atom Assets are objects used to load data from an ACF file and the associated Cue Sheets.
By adding a component to an object of the scene, it is possible to specify an ACF asset and the list of the ACB assets to load. The DSP Bus Setting can also be selected.
Then the Cri Atom Source For Asset components are used to produce sound using ADX2. Unlike the standard component, where you have to type by hand the name of the ACB and the Cue, it is now possible to select – or drag and drop – an ACB asset directly into the Inspector. The Cue can then be selected from a list.
Other parameters such as Volume, Pitch, and 3D Positioning remain unchanged.
The new Asset Support Add-on gives you more control over the management of your ADX2 or Softdec2 assets within Unity, and its workflow improvements better suit modern game development.