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
- Move to Package Manager. If you installed 1.0.8 or earlier, download
LoreMind-Upgrade-to-Package-Manager.unitypackagefrom 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. - 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
DirectApiTransportor callsLoreService.SetServerMediatedAuthbelongs inside#if UNITY_EDITOR || UNITY_SERVER. See Backend Setup. - 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.
- Use https backend URLs. Plain
httpworks only forlocalhost, in the Editor and Development Builds. To test on a phone, see Testing a Local Backend on a Phone. - 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.
- 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
DirectApiTransportandLoreService.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_SERVERstops compiling.LoreService.PlayerIdreturns 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
CustomBackendTransportwith an unsafe URL is not ready: its requests fail withCONFIG_ERRORand nothing is sent. Release builds with a non-https orlocalhostBackend URL fail. EditorApiClient,ScannerApiClientandDirectApiTransportthrowArgumentExceptionfor 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
httpto a LAN address (such ashttp://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 aVALIDATION_ERRORand nothing is sent.
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
CustomBackendTransportare now logged as errors (rate limits and 503s stay warnings). npc.Contextis 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 readnpc.Context.nearbyCharacters,nearbyObjects,timeOfDayorrecentEventsafter a request now sees only its own values.- Conversation history is validated. A message whose role isn’t
userorassistant, or that has no content, is aVALIDATION_ERRORand nothing is sent. Create messages withConversationMessage.User()andConversationMessage.Assistant(). DirectApiTransportkeeps aplayerIdalready set on the request; its constructor’s player is the default for requests without one.- A destroyed NPC returns
CANCELLED, including in Edit Mode, andRespondAsyncon an NPC that’s already destroyed returnsCANCELLEDwith no events. - Microphone code is compiled only in voice projects: with whisper.unity installed (automatic) or with the
LOREMIND_MICROPHONEscripting define. A project that captures the microphone without Whisper must add that define. See Voice Input. - Voice behavior.
StartCapture()raisesOnErrorwhen 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 afterLoreMindVoiceInputis 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.
LoreServiceandEntityMindare obsolete. UseLoreMindNPC.MainThreadDispatcher.Instanceis obsolete and always returns null. CallMainThreadDispatcher.RunOnMainThreadAsyncdirectly.- Editor code: public methods of
EditorApiClientandScannerApiClientgained an optionalCancellationTokenparameter. 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
OnRequestFinishedevent. It fires once when a request ends, success or failure: the place to hide a “thinking” indicator. Checkresponse.successthere before showingresponse.response.OnResponseCompletestill fires only after a successful reply, as in 1.0.8.RespondAsyncnever returns null. New codesBUSY,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 optionalICancellableLoreMindTransportinterface. - 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 unavailableretried automatically afterRetry-After, then reported asLORE_UNAVAILABLE. LoreMind never answers without the NPC’s lore. See Timeouts and Retries. - Player session token.
CustomBackendTransport.AuthTokenProvider/ConfigureRequestsend 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
DirectApiTransportbetween players by settingrequest.playerIdper 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
- Installation: Package Manager install, updates, and moving from 1.0.8 or earlier
- Backend Setup: production transport, session tokens, and timeouts
- API Reference: every type and error code