CRIWARE Unity Plugin Manual  Last Updated: 2024-07-12
Information relevant to all samples

Location of the samples

The samples for CRIWARE for Unity are located at the following locations in the SDK.

Location of the samples in the SDK
  * CRIWARE

  \ * SDK

    \ * unity

      \ * samples

        \ * UnityProject

          \ * Assets

            \ * Scenes

              o * criatom

              o * crifilesystem

              \ * crimana

 

 

 

 

 

 

 

Samples for CRI ADX

Samples for CRI File System (FileMajik Pro)

Samples for CRI Sofdec

 

Sample files

Each library's sample scenes have been put into a single Unity project.
Scripts, data, and libraries are provided in this project so that you can execute the sample scene immediately.
The following shows the organization of a typical project folder.

CRI Sample Project
  * UnityProject

  o * Assets

  | o * CRIMW

  | o * Scenes

  | | o * criatom

  | | | o * basic

  | | | | o * Scene_01_SimplePlayback.unity

  | | | | \ * Scene_01_SimplePlayback.cs

  | | | \ * ...

  | | o * crifilesystem

  | | \ * crimana

  | o * Plugins

  | o * Resources

  | \ * StreamingAssets

  |   o * foo.acf

  |   o * foo.acb

  |   \ * ...

  \ * ProjectSettings

 

the Assets folder

: CRIWARE Unity Plugins

: Scene files/C# scripts for samples

 

: Sample for basic features

: Scene file

: C# script file

 

 

 

: Platform-specific plugins for the sample project

 

: Data for samples

 

 

 

: Project settings

 

Scenes

If one sample demonstrates multiple features, a different scene is provided for each feature.
For example, the "Basic samples" project for CRI ADX contains eight scenes.

The corresponding files are located in the Scenes folder.
The C# script files for each scene are also included.

Data for the samples

The StreamingAssets folder stores the data for the samples.

Data files
Type Extension Description
Atom binary file *.acf, *.acb, *.awb Binary sound files for CRI ADX.
Created in CRI Atom Craft.
USM file *.usm Movie file for CRI Sofdec.
Created by the Sofdec2 Encoding Wizard.
CPK file *.cpk Packing file for FileMajik PRO.
Created in CPK File Builder.


Note
In some cases, platform-specific data (such as data for Android) is provided.

How to run a sample in Unity Editor

(1) Opening a scene file
To run a sample in Unity Editor, open the scene file in the Scenes folder of the sample.
If multiple scene files are provided, open the scene file with the smallest scene number (Scene_xx).

(2) Running the sample
Click on the Play button in Unity Editor to run the sample.

cri4u_samples_unity_toolbar.png

(3) Switching scenes
If the sample has multiple scenes, you can switch to another scene while running the sample.
If the "Change to Other Sample" message is displayed on the screen, click on the message to show a list of scenes. Then you can switch to another scene.

cri4u_samples_scenechange.png

Important
Below the list of scenes that is displayed, each scene is described.

About SampleIO

In the CRI sample, the SampleIO object is located in the hierarchy for all the scenes. This object manages the "VirtualPad" that controls sample application.
Virtual pad
When executing a scene on which the SampleIO object is allocated, the "Show" button is displayed at the lower left of the screen. By pressing this button, the virtual pad will appear. Pressing an arrow key in the virtual pad can move a focus on the GUI component being displayed by default. The input to the virtual pad is reflected to the status of the currently focused GUI component.
Attention
The SampleIO is only an auxiliary mechanism and is not important for the behavior of the CRIWARE plugin. So, details of the SampleIO are not described here.