Repository navigation
OnlyWorlds Unity SDK 0.58.0
The package makes a written promise about what a release may change, checked on every push, and takes the names
the TypeScript SDK keeps in its 5.0: GroupOf, GroupOrder, ColorOfGroup, OWGroupColor and ResolveCalendar,
with the old names marked to leave in 1.0. Parity with the TypeScript SDK 4.212.0 to 4.213.0 on calendar bounds,
too-deep world files and a press of Cancel, and every pack now refuses a name its own reader refuses. A minor release
because it adds public API (below).
Added
-
The names the TypeScript SDK keeps in its 5.0:
groupOf,GROUP_ORDER,GROUP_COLORSandresolveCalendar.
OWPresentation.GroupOf(type)answers a type's colour group, its word (bluefor a Character);
OWPresentation.GroupOrderthe four words in the sidecar's order;OWPresentation.ColorOfGroup(word)a group's two
colours as the new structOWGroupColor(Light,Dark,For(darkSurface)).OWCalendarLens.ResolveCalendar(elements, activeId)resolves a chosen calendar andOWCalendarLens.ResolveCalendarNeverChosen(elements, fallbackToOnly)one
never chosen. Each answers exactly as the name it replaces, which now calls it (see Deprecated). The family names
always answered the colour words, asgroupOfdoes; the TypeScript SDK's ownfamilyOfanswers its words from
before 4.102.0 (agents,world,abstract,temporal), so the group names are the true twins. -
The package's written promise, held on every change. A patch release fixes and a minor release adds; neither
removes nor renames a public name, and the package keeps to this while it is 0.x. A name that will go is marked first,
saying since which release, what to use instead and the release it leaves in, and goes no sooner than six months
later, in 1.0. The README's Versions line says so and links the docs' Stability page. The mark is[Obsolete("Since X.Y.Z. Leaves in 1.0. Use Y.")], a warning.tools/verify_promise.pyholds the package's public names, listed in
tools/public-names.json, and their marks to the promise in a new workflow on every push and pull request, which
needs no Unity install: Roslyn's parser reads the names from the source (tools/PublicNames).
tools/mutants_promise.pywatches it fail once for each rule. No release so far has removed or renamed a public name. -
Parity with the TypeScript SDK 4.213.0: a press of Cancel is
cancelled. keel's consent page answers Cancel by
returning to the registered address witherror=access_denied, the sign-in's state and no code.
OWClient.CompleteSignInAsyncrefused that return asstate_mismatch, which says the page was not reached from this
sign-in. It now throwsOWSignInErrorwith the new reasonOWSignInReason.Cancelled("cancelled"): nothing is
sent and the sign-in has ended, so a game can put the player back where they were. A return with anothererrorand
no code isfailed, that error asCode. A Cancel with another state, or at another page, is still
state_mismatch. The TypeScript SDK's error also hands back theresumeits storage kept; here the caller holds the
pending sign-in and whatever it kept beside it, so there is nothing to hand back.
Changed
OWPresentation.ColorOfTypereturnsOWGroupColor?(it returnedOWFamilyColor?), the same two colours. The
old struct converts from the new one, soOWFamilyColor? c = OWPresentation.ColorOfType(t)still compiles, with the
old struct's deprecation warning.OWGraph's nodeFamilyis filled byGroupOf, the same word.OWClient.AskAsyncandOWClient.SortAsyncsay when they leave. Each[Obsolete]message now opensSince 0.37.0. Leaves in 1.0.before the call to use instead,AiAsync. Both are still a warning, never an error, and keep
working, unchanged, until 1.0.- Parity with the TypeScript SDK 4.212.0: the validator names the size bounds.
OWCalendar.ValidateValueand
OWCalendar.Validatenow say which of the calendar profile's size bounds a value is past, in the TypeScript SDK's
words: "A calendar holds at most 256 eras", "A calendar holds at most 64 months", "A week holds at most 64 steps and
64 names", "A calendar holds at most 16 festival days", "An except list holds at most 8 numbers" (version 2), "A name
or template holds at most 256 characters" and "A year holds at most 2^53 - 1 steps". One message at most, the first
bound in that order, after the era checks and before the overlaps. The reader already refused such a value; now the
validator says why. - Parity with the TypeScript SDK 4.212.2: the year bound on a calendar with no months.
OWCalendar.ValidateValue
andOWCalendar.Validatenow say "A year holds at most 2^53 - 1 steps" when a calendar with no months has a
year.stepspast 2^53 - 1, as the reader already refused it. - Parity with the TypeScript SDK 4.212.1: a whole count is worded exactly.
OWCalendar.FormatDuration(CalendarConfig, double)showed a whole count past 2^53 / 100 rounded throughn * 100, so 9007199254740990 steps read
9007199254740989 days; a whole count is now shown as it is (thelongoverload already did). Astep_namethat is
not a string already read as absent here; the TypeScript SDK now reads it the same way, so the two agree. - Parity with the TypeScript SDK 4.212.3: a world file refused for a
world.jsonnested past 200 levels says it in
words alone. The message ofOWWorldArchive.Read's refusal no longer carries thetoo_deep:mark; it ends
"world.json in '…' is nested more than 200 deep.", and the code isOWFolderFormatException.WorldFault, which a tool
reads. The folder reader's refusal and a skipped file's reason keeptoo_deepin their text, as the TypeScript SDK's
folder route and skip reasons do. OWWorldArchive.Packrefuses aworld.jsonnested past 200 levels in the same words, withReasonset to
not_a_worldandWorldFaulttotoo_deep, as the TypeScript SDK'swriteWorldFilerefuses it, in a copy and in a
share. It said "is not valid JSON." before, of a text that
is valid JSON.Packalready refused a folder holdingSpatial/(orspatial/with a long s) besideelements/, as a copy and as
a share, with the causename_caseand nothing written; the TypeScript SDK 4.212.3's writer now refuses it too, and
a test holds the shape.
Deprecated
Each is marked [Obsolete("Since 0.58.0. Leaves in 1.0. ...")], a warning, never an error. Each keeps working,
unchanged, and leaves in 1.0, no sooner than six months after 0.58.0, as the TypeScript SDK drops them in its 5.0.
OWPresentation.FamilyOf,FamilyOrderandColorOfFamily, in favour ofGroupOf,GroupOrderand
ColorOfGroup: the same words and colours.- The struct
OWFamilyColor(and itsLight,DarkandFor), in favour ofOWGroupColor, the same two colours. OWCalendarLens.ResolveLensandResolveLensNeverChosen, in favour ofResolveCalendarand
ResolveCalendarNeverChosen: the same answers ("lens" now names a cut of a world, not a chosen calendar).OWLayoutByKind.VersionandOWLayoutAround.Version, with nothing in their place: the layout profile's mark
carries no version key, and a method's word is its version, so readMethod.OWLayoutByLinks3d.Versionstays.
Fixed
OWWorldArchive.Packrefuses to write a world file its own reader would refuse for a name, as the folder
format's writer rules ask (§4.7: OW-16, OW-18, OW-19, OW-22) and as the TypeScript SDK'swriteWorldFilerefuses
it. Before a byte is written, every entry name goes through the reader's checks: a name some disk cannot hold (a
Windows device name such asmedia/aux.png, a name ending in a dot or a space, a reserved or control character)
is refusedname; two names that are one after case folding are refusedcollision; a path that would be a file
and a folder is refusedunsafe_path, and so is a world folder namedmimetype(the marker's name), while one
namedMimeTypeis refusedcollision.OWFolderFormatException.Reasoncarries the cause and nothing is written.
Before, such a folder was packed into a file thatOWWorldArchive.Readthen refused.