Skip to content

OnlyWorlds Unity SDK 0.61.4

Choose a tag to compare

@tmoosting tmoosting released this 30 Nov 14:37
· 25 commits to main since this release

Two world folder fixes: two elements whose ids differ only in case are refused rather than written over one another,
and an id ending near a character above U+FFFF is named by its last eight code points.

Changed

  • The TypeScript SDK's and the Python package's shared case-collide cases are followed at their 4.225.0 and 0.159.0
    bytes: 23 cases, two new written ones among them (a final sigma beside a sigma in otherwise different ids, and the
    Kelvin sign beside a k), and all pass.

Fixed

  • An element id that ends near a character above U+FFFF (an emoji) is named by its last eight code points. A world
    folder's file name takes the id's last eight characters, and OWFolderWriter.IdTail counted UTF-16 units: an emoji
    counted twice, so a1234567😀 was written as bob--234567😀.json, and an id such as a😀1234567 cut the emoji in
    half and gave a file name with a lone surrogate in it. The folder format now rules the tail in code points (its
    next serial), as the Python package and the Godot and Unreal SDKs count it.

  • Two elements whose ids differ only in case are no longer written over one another. OWFolderWriter.Write,
    OWFolderWriter.WriteElement and OWFolderExport wrote two elements of one type such as Ab1 and ab1 (or Ä1 and
    ä1, Σ1 and σ1) under two file names that Windows and macOS take as one file: the second landed over the first,
    and the folder held one element where two were given, with no error. For ids like these the full-id fallback of the
    collision rule folds like the short name, so the rule cannot separate them. The write is now refused before anything
    is written, with Reason collision and a message in the same words as the TypeScript and Python packages, naming
    the type, both ids and their file names (character element ids "Ab1" and "ab1" give the file names "Ab1.json" and "ab1.json", which are one name once folded (NFC, then simple case folding), so a case-insensitive disk (NTFS, APFS) may keep one file for both.). Names are compared after NFC and simple case folding, the fold the .owworld reader
    already uses, so Dž1 and dž1, K1 (the Kelvin sign) and k1, ς1 and σ1, and an é1 written two ways (one
    letter, or e and an accent) are refused too, while ß1 and ss1, and İ1 and i1, are written as two files.
    Ids that differ in more than case are written as before. The packages' shared cases (case-collide.cases.json,
    TypeScript SDK 4.224.1) are held as a test.