DirectConvertor

$9
Publisher Sergey Jakovlev
File size 344.75kB
Number of files 27
Latest version 1
Latest release date 2021-02-19 12:02:19
First release date 2021-02-19 12:02:19
Supported Unity versions 2018.4.2 or higher

Direct conversions are alternative to serialisation. Two formats are used:

  • text format, which is most representative. Class fields are converted into text and separated by indents (\t) and line wraps (\n);
  • binary, wich is most economical. Class fields are converted into bytes sequence.

Results can be written in file immediately or produced as dump, which consequently can be written or sent via network.


Many approaches to serialization control use class attributes and reflection, which creates a lot of inconveniences and slows down the process. Direct conversions instead use a specially developed set of classes and interfaces, which allow customising flexibly which fields will be converted into integrated file or data dump.


Current version supports conversion of following frequently used fields:

  • Primitive types: string, int, float, bool;
  • Specific types: Guid, Vector3, Transform;
  • Hierarchical aggregation of objects, including Unity components (prefabs);
  • Generalised lists List<> both with primitive types and with objects (including nested lists and dictionaries);
  • Dictionaries Dictionary<,> with string or int as keys, and primitive types and objects (including nested lists and dictionaries) as values.

If necessary, new types can be added comparatively easily.


Guide and examples


Manual EN


Manual RU