Skip to Content
Loremind Unity SDKWhat's New in 1.0.9

What’s New in 1.0.9

LoreMind Unity SDK 1.0.9 installs and updates through Package Manager, keeps Server API Keys out of game client builds, ends every request in one clear outcome, and waits for slow first replies.

Requires Unity 2022.3.62f2 or later, 6000.0.58f2 or later, 6000.2.6f2 or later, or any 6000.3 release. These include the fix for CVE-2025-59489 (see Requirements).

What You Need to Do

  1. Move to Package Manager. If you installed 1.0.8 or earlier, download LoreMind-Upgrade-to-Package-Manager.unitypackage from the latest release , import it, and click Move to Package Manager. Your settings, API keys, scenes and prefabs are kept. See Moving from 1.0.8 or Earlier.
  2. Send game builds through your backend. A game must never contain your Server API Key. If the transport mode is EditorDirect, switch to CustomBackend (your backend’s URL) or SetInCode in Window > LoreMind > Control Panel > Project before you build. EditorDirect keeps working in the Editor. Code that creates a DirectApiTransport or calls LoreService.SetServerMediatedAuth belongs inside #if UNITY_EDITOR || UNITY_SERVER. See Backend Setup.
  3. Check your NPCs’ Active Knowledge Tags. Tags saved on an NPC limit it to the lore with those tags. Check them, and remove blank tags.
  4. Use https backend URLs. Plain http works only for localhost, in the Editor and Development Builds. To test on a phone, see Testing a Local Backend on a Phone.
  5. Enter your API key in each project. Keys are saved per project. If a project’s Control Panel shows no key, enter it again there.
  6. Using Dissonance for voice input? Connect it with a custom audio provider.

Everything else updates automatically. The first time you open your project after updating, LoreMind runs an upgrade check: it fixes what it safely can, tells you what it changed, and lists the NPCs that have Active Knowledge Tags. Run it again from Control Panel > Settings > Run Upgrade Check.

The sections below cover every change in detail, for projects with custom code.

Breaking Changes

Server keys stay out of game clients

  • DirectApiTransport and LoreService.SetServerMediatedAuth (which send a LoreMind Server API Key) exist only in the Editor and in Dedicated Server builds (UNITY_SERVER). Client code that references them outside #if UNITY_EDITOR / #if UNITY_SERVER stops compiling. LoreService.PlayerId returns null in client builds.
  • Game client builds in EditorDirect mode now fail with an explanation. Set the transport mode to Custom Backend (a backend URL in the settings) or to the new SetInCode (your code calls npc.SetTransport(...); nothing is required in the settings). Dedicated Server builds only warn. See Backend Setup.

URLs are checked

URLs that receive a key or a player token must be https, with no user name or password. Plain http is accepted only for localhost, and only in the Editor and Development Builds. Backslashes, spaces and control characters are refused.

  • A CustomBackendTransport with an unsafe URL is not ready: its requests fail with CONFIG_ERROR and nothing is sent. Release builds with a non-https or localhost Backend URL fail.
  • EditorApiClient, ScannerApiClient and DirectApiTransport throw ArgumentException for an unsafe URL.
  • An unsafe Base URL override is ignored (Editor tools and EditorDirect use production, and the Control Panel says so).
  • Testing on a phone against a backend on your computer: plain http to a LAN address (such as http://192.168.1.20:3000) is refused, even in Development Builds. See Testing a Local Backend on a Phone.

API keys are stored per project

If a project’s Control Panel shows no key after updating, enter it again there.

Saved Active Knowledge Tags now take effect

Saved Active Knowledge Tags (Inspector or code) now narrow what each NPC can reference. Check the tags on your NPCs.

  • Tags the Entity Mind doesn’t have are ignored, and each one is shown as a Console warning in the Editor and Development Builds.
  • If none of the tags exist on the Entity Mind, the request fails with UNKNOWN_KNOWLEDGE_TAGS: no reply, no credits used.
  • A null, empty or whitespace-only tag (for example a blank element left in the Inspector list), or more than the server’s limits, is a VALIDATION_ERROR and nothing is sent.

See Active Knowledge Tags.

Other breaking changes

  • Log level. New settings assets default to Errors, so failures are visible in the Console. Projects upgraded from an older version keep their saved level: set it in Control Panel > Settings > Log Level. HTTP failures from CustomBackendTransport are now logged as errors (rate limits and 503s stay warnings).
  • npc.Context is no longer written during a request. Global time of day, world events and sensed nearby characters and objects are merged into a separate copy for each request. Code that read npc.Context.nearbyCharacters, nearbyObjects, timeOfDay or recentEvents after a request now sees only its own values.
  • Conversation history is validated. A message whose role isn’t user or assistant, or that has no content, is a VALIDATION_ERROR and nothing is sent. Create messages with ConversationMessage.User() and ConversationMessage.Assistant().
  • DirectApiTransport keeps a playerId already set on the request; its constructor’s player is the default for requests without one.
  • A destroyed NPC returns CANCELLED, including in Edit Mode, and RespondAsync on an NPC that’s already destroyed returns CANCELLED with no events.
  • Microphone code is compiled only in voice projects: with whisper.unity installed (automatic) or with the LOREMIND_MICROPHONE scripting define. A project that captures the microphone without Whisper must add that define. See Voice Input.
  • Voice behavior. StartCapture() raises OnError when the microphone isn’t running. CancelCapture() discards the audio instead of transcribing it. A missing or broken Whisper model is reported as “Transcription failed”, not “No speech was recognized”. Nothing is delivered after LoreMindVoiceInput is disabled or destroyed.
  • Whisper language defaults to empty, which keeps the WhisperManager’s own language. To use another language, set it in Control Panel > Voice.
  • No Dissonance integration. Use a custom audio provider.
  • LoreService and EntityMind are obsolete. Use LoreMindNPC.
  • MainThreadDispatcher.Instance is obsolete and always returns null. Call MainThreadDispatcher.RunOnMainThreadAsync directly.
  • Editor code: public methods of EditorApiClient and ScannerApiClient gained an optional CancellationToken parameter. Source compiles unchanged; a precompiled Editor DLL that calls them must be rebuilt.

New

  • Package Manager install and updates. New versions show an Update button in Window > Package Manager, and Control Panel > Settings > Updates checks for them once a day (you can turn that off). The examples are a Package Manager sample: Window > Package Manager > LoreMind > Samples > Import. See Installation.
  • Active Knowledge Tags are sent by every transport, and unknown tags come back in response.metadata.warnings.
  • New OnRequestFinished event. It fires once when a request ends, success or failure: the place to hide a “thinking” indicator. Check response.success there before showing response.response. OnResponseComplete still fires only after a successful reply, as in 1.0.8. RespondAsync never returns null. New codes BUSY, EMPTY_TEXT, CANCELLED. See What Happens on Every Request.
  • Cancellation. RespondAsync(text, cancellationToken); requests abort when the NPC is destroyed or Play mode ends; the optional ICancellableLoreMindTransport interface.
  • Clearer errors. The server’s own error messages, and new codes FORBIDDEN, TERMS_NOT_ACCEPTED, ENTITY_MIND_NOT_FOUND, NOT_FOUND, SERVER_ERROR, RESPONSE_TOO_LARGE, UNKNOWN_KNOWLEDGE_TAGS. Custom backends get the same codes. See Error Codes.
  • Slow first replies. 600-second timeouts, so a slow first reply after a period of inactivity is never cut off, and 503 Lore unavailable retried automatically after Retry-After, then reported as LORE_UNAVAILABLE. LoreMind never answers without the NPC’s lore. See Timeouts and Retries.
  • Player session token. CustomBackendTransport.AuthTokenProvider / ConfigureRequest send your player’s session token to your backend. See Sending the Player’s Session Token.
  • SetInCode transport mode for games that create their transport in code.
  • Dedicated servers can share one DirectApiTransport between players by setting request.playerId per request.
  • Voice input. Just-in-time microphone permission on Android and iOS, and no microphone permission at all in text-only games.
  • Editor. The Scanner skips files that look like keys and asks before uploading likely secrets.

Next Steps

Last updated on