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.
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.
[Note]
In that case, bounded CPK files will be examined one after the other, so file search may take time.
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.
[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.