Files
edmand46 b18c59450c
CI / check (push) Successful in 2s
CI / publish (push) Has been skipped
2.0.0: Rudder.Core 2.0.0 DLL, samples and skill docs on slugs and environments
Claude-Session: https://claude.ai/code/session_01SMCvdwDmuxoaqGgvGBLk1V
2026-09-06 22:25:33 +03:00

6.6 KiB

Changelog

2.0.0

Breaking changes, following Rudder.Core 2.0.0 and the backend environments release. The bundled Runtime/Plugins/Rudder.Core.dll is rebuilt from Rudder.Core 2.0.0.

A project now has exactly two environments, staging and prod. The SDK key set in RudderConfiguration belongs to one of them, so the environment is resolved at login and carried inside the tokens; nothing in the API takes an environment argument and players do not cross between environments. Tokens saved to PlayerPrefs by 1.x have no environment claim and are rejected with 401: the refresh fails, the stored tokens are cleared and Auth.AuthStateChanged fires SignedOut, so call LoginWithDeviceAsync again on that event.

Quests, scenarios and offers are addressed by slug instead of id, because ids differ between staging and prod. Quest.Id became Quest.Slug, Quests.ClaimAsync takes a quest slug, Quests.ReportProgressAsync returns quest slugs, Stores.PurchaseAsync takes an offer slug and Offer carries a Slug, QuestMetrics.PurchaseOffer builds its metric from the offer slug, and every scenario-scoped effect and request exposes ScenarioSlug instead of ScenarioId (PendingEffect, ScenarioCompletedEffect, ScenarioFailedEffect, the battle pass requests, BattlePass.GetProgressAsync). Store.ScenarioId is unchanged — it is an authoring reference, not a player-facing one. The Store/Inventory and Scenarios samples were updated to offer.Slug.

Also inherited from Core: the effects client reconciles against every pending poll, so a run that disappeared server-side emits OnScenarioCompleted instead of lingering, and run_not_active is a terminal rejection that drops the run and emits OnScenarioFailed.

1.0.0

Breaking changes, following the Rudder.Core 1.0.0 rework:

  • Bundled Rudder.Core.dll updated to 1.0.0. The local scenario graph engine is gone. client.Scenario is only TriggerAsync(eventName). Pending nodes surface on client.Effects (OnNotification, OnStoreOffer, OnLeaderboard, OnWait, OnQuest, OnBattlePass, OnBattlePassLevel, OnScenarioCompleted, OnScenarioFailed).
  • Session types (NotificationSession, StoreOfferSession, …) are now *Effect types. Completion methods: Done/DoneAsync, Purchase/Decline, End/Claim, ReportProgress, LevelUp.
  • UnityPlanScheduler removed together with the core IPlanScheduler abstraction and RudderClientOptions.Scheduler; the factory no longer wires a scheduler.
  • UnityPlanStateStore, UnityRealtimeTransportFactory, Runtime/Sources/Realtime/ websocket adapters, and Runtime/Plugins/WebGL/RudderWebSocket.jslib removed together with Core IPlanStateStore / IRealtimeTransport / RealtimeService.
  • RudderConfiguration.RealtimeUrl and RudderUnityClientOptions.RealtimeUrl removed. Rudder no longer disconnects a realtime socket on quit.
  • Rudder.Update still pumps client.Update(Time.deltaTime) (effects heartbeat and wait-deadline checks).
  • Samples and docs use Auth.LoginWithDeviceAsync. Pending effects are fetched after sign-in via the heartbeat; Scenario.RestoreAsync / AuthorizeWithDeviceAsync are gone.
  • Core model fields are nullable now; samples check PurchaseResponse.Success != true instead of !Success.
  • Feature sample scenes for authentication, remote config, storage, stores and inventory, leaderboards, and scenarios (Samples~).
  • Removed the Cozy Collector example project from the Unity SDK repo.
  • Added AGENTS.md with Unity integration rules for coding agents.
  • Rudder.Initialize() is now synchronous, takes no arguments, and returns RudderClient. Put Rudder in a scene with a RudderConfiguration. The old Initialize(RudderConfiguration) (hidden GameObject) is gone.

0.3.0

Breaking changes, following the Rudder.Core 0.3.0 rework:

  • Bundled Rudder.Core.dll updated to 0.3.0: the UGC surface is gone (client.Ugc, IUploadTransport, RudderClientOptions.UploadTransport), BattlePassService methods now take scenario context, BattlePassSession exposes bound battle pass operations, and BattlePassLevelSession.Complete was renamed to Claim.
  • UnityUploadTransport removed together with the core IUploadTransport abstraction; the factory no longer wires an upload transport.
  • RudderConfiguration defaults now point at production (https://api.rudder.build); RealtimeUrl follows the prod wss:// pattern but the relay is not deployed yet.

0.2.0

Breaking changes, following the Rudder.Core 0.2.0 rework:

  • Rudder moved into the RudderSdk.Unity namespace.
  • Rudder is now a thin facade: Client, State (RudderState), LastError, Ready and Initialize(RudderConfiguration). The service shortcuts (Rudder.Auth, Rudder.Stores, ...) are gone — use Rudder.Client.*.
  • Rudder.Initialize(configuration) creates its own hidden GameObject when no scene component exists; statics reset on Enter Play Mode without domain reload, and realtime disconnects gracefully on quit.
  • LiveOpsConfiguration renamed to RudderConfiguration (Create > Rudder > Configuration), with tooltips, an empty-ProjectKey warning and a configurable TimeoutSeconds (default 10).
  • Core renames propagate: client.Scenariosclient.Scenario, BattlepassServiceBattlePassService, SendAsyncTriggerAsync, LoginViaDeviceAsyncLoginWithDeviceAsync(region, language, nickname?), StoresService.BuyAsyncPurchaseAsync(slug, offerId, idempotencyKey?).
  • Scenario events reduced to the canonical set (OnNotification, OnStoreOffer, OnLeaderboard, OnConfigChanged, OnWait, OnQuest, OnBattlePass, OnBattlePassLevel, OnScenarioCompleted, OnScenarioFailed); legacy events and *Session renames applied.
  • Transport errors are now RudderApiException subclasses (RudderAuthException, RudderNotFoundException, RudderRateLimitException, RudderNetworkException); the bare Exception in the upload transport and the stringly "network" / "http_error" codes are gone.
  • UnityWebRequestExecutor / UnityUploadTransport wait via UnityWebRequestAsyncOperation.completed instead of busy-polling and apply a configurable UnityWebRequest.timeout.
  • IRudderLogger now reports a RudderLogLevel; IUnityLoggerSink mirrors it and UnityDebugLoggerSink maps levels to Debug.Log*.
  • Bundled plugins slimmed down: only Rudder.Core.dll ships. Newtonsoft.Json comes from com.unity.nuget.newtonsoft-json; Tiny-JSON.dll and the System.* facades were removed.

0.1.0

Initial UPM package: Rudder.Core wrapper with UnityWebRequest transport, PlayerPrefs storage, websocket realtime and the Cozy Collector demo.