Repository navigation
OnlyWorlds Unity SDK 0.60.0
A standard field's value of the wrong kind is refused before sending (2.5, "7" or true in an integer field; a
non-string in a text field), where the server took it and stored another value. Parity with the TypeScript SDK
4.220.0. A minor release because it adds public API (below).
Added
OWElementTypes.IntegerFieldNames,IsIntegerField(slug, field)andIsTextField(slug, field): the kinds a write
is checked against. Generated from the schema besideStringFieldNames: the integer fields per type, and whether
a field is an integer or a text field of a type in the standard.IsTextFieldisIsStringFieldplus the pin's
element_type, which the wire carries as text, and answers false for a type outside the standard (where
IsStringFieldanswers the base fields).
Fixed
- A value the server would store as another is refused before sending. The server takes a value of the wrong
kind with a 200 and changes it: an integer field stores2.5as2,"7"as7andtrueas1; a text field
stores a list as"['a', 'b']"and12as"12".CreateAsync,UpsertAsync,PatchAsync,BulkAsyncand
ProposeAsyncnow throwArgumentException: patch: character.height is an integer field; 2.5 would be stored as another value. Nothing was sent.(and... is a text field; 12 is not a string), the value asJSON.stringify
writes it (a NaN asnull). An integer field takes a whole number (2.0is one) ornull, a text field a string
ornull; extensions, link fields and a type outside the standard are not checked. A typed model already holds
its kinds. Parity with the TypeScript SDK 4.220.0, its test vector ported.