Translations:Modding:Chunk Moddata/4/en

From Vintage Story Wiki
Revision as of 06:52, 19 September 2022 by FuzzyBot (talk | contribs) (Importing a new version from external source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Custom data is stored as an array of bytes to save space, but we can easily convert any valid C# type to byte[] with a very convenient class in the VintageStory API: SerializerUtil. This class provides us with two static methods that allow us to quickly Serialize into byte arrays, and Deserialize<T> them into other types.