CRIWARE Unity Plugin Manual  Last Updated: 2024-07-12
Binder

About binders

A "binder" (CriFsBinder) is like a virtual drive or device.
You can register files, directories and CPK files in a binder (binding).
A file can then be loaded by the "loader" (CriFsLoader) via the binder.
fmpu_keys_multibind_image_mini.png

Advantages of a binder

A binder has the following advantages:
  • Whether the source is a file, a directory or a CPK file, the code to load it will be similar.
  • You can use a binder to switch the sources easily.
  • You can manage multiple sources collectively ("multi-bind").
  • You can load a file quickly because it is opened at the binding stage.
    • It is also effective to bind a single file.
    • You can also bind files on the network. It helps reduce the network load.

Multi-bind function

You can register multiple sources with a binder so that it can be used in the following ways:

Binding multiple CPK files

When binding multiple CPK files, you do not need to know which CPK file contains which content files.

fmpu_keys_multibind_dirbind3_mini.png
[Note]
In that case, bounded CPK files will be examined one after the other, so file search may take time.

See a sample at " [CriFs] Directory binding ".

Directory binding

You can bind a CPK file and a directory.
When data is updated in the CPK file, the update is not packed there. Instead, an update file is created.

fmpu_keys_multibind_dirbind_mini.png
[Note]
When using directory binding, the files are not opened at the binding stage.
It means that file access will take more time because a file will be opened only when it is loaded.
Use this function for debug, for example to check the data on the target machine when it is updated.

See a sample at " [CriFs] Native API wrapper ".

Providing update files via Internet

You can locate update files under a specified directory on a server and provide them via Internet.

fmpu_keys_multibind_dirbind2_mini.png