Skip to content

v0.11.0

Choose a tag to compare

@nickpettit nickpettit released this 22 Sep 18:41
· 10 commits to main since this release

[0.11.0] – 2025-09-22

Breaking Change

Moved from ISaveable to ISaveable<TState> to provide compile-time type safety, safer JSON deserialization (no type names), and clearer save/restore contracts. All saveables must now define a serializable TState and implement CaptureState(): TState and RestoreState(TState state).

Serialization & Safety

  • JSON now deserializes directly to each saveable’s TState (no type names emitted), reducing polymorphic-deserialization risk.
  • Existing save files that match the new TState shape should continue to load; files that relied on polymorphic object states will need a one-time migration.

Async/Awaitable & Concurrency

  • Replaced single-iteration “while not cancelled” wrappers with clear guard clauses.
  • Fixed a rare operation-queue race by making enqueue/start atomic behind a lock; IsBusy is reset in a finally block.
  • Broader cancellation: operations link destroyCancellationToken with Application.exitCancellationToken.
  • Exception surfacing: errors are logged and rethrown so callers can observe faults when awaiting.
  • Logging helpers include a Unity context only when on the main thread; background-thread logs remain safe.

Miscellaneous

  • FileHandler keeps the public API and formatting; small internal cleanups (consistent use of computed fullPath, clearer errors on delete).
  • Updated all Samples to the ISaveable<TState> pattern.

Migration notes

  1. Replace ISaveable with ISaveable<TState> and define a serializable TState (struct or class).
  2. Update methods to TState CaptureState() and void RestoreState(TState state).