Skip to content

OnlyWorlds Unity SDK 0.29.0

Choose a tag to compare

@tmoosting tmoosting released this 31 Oct 07:27
· 244 commits to main since this release

OWLinkListener hands over a link as it was received, beside its reading, and its dispatch can turn a link down by
returning false instead of throwing; OWMainThread.TryRun queues work without throwing when no pump is installed.
A minor release because it adds public API (below).

Added

  • OWLinkListener has a second constructor, (port, Action<OWAddressReading, string> onLink, Func<Action, bool> dispatch = null, timeoutMs). onLink gets the line as received beside its reading, its line ending stripped: what
    a paste of the link would carry. It is kept for readings that cannot be written back as an address, such as a site
    address that names its world by slug. The dispatch can decline by returning false, and the sender hears
    refused no_receiver, as it does when a dispatch throws. Before this, throwing was the only way to refuse. The
    default dispatch is OWMainThread.TryRun. The first constructor is unchanged.
  • OWMainThread.TryRun(action): queues as Run does and returns true, or returns false with nothing queued when
    no pump is installed or the action is null. Run still throws in that case.