← all repositories
undreamai/LLMUnity

Unity characters with local LLM brains

A Unity package that gives game characters offline LLM brains so players can chat with NPCs without calling the cloud.

LLMUnity
Not currently ranked — collecting fresh signals.
star history

What it does LLMUnity is a Unity package that drops large language models into game characters as C# components. It wraps a custom llama.cpp backend called LlamaLib to run inference locally on the player’s device, handling NPC dialogue without external API calls. The package also includes a retrieval-augmented generation system so characters can query in-game knowledge bases via semantic search.

The interesting bit The project treats offline operation as a core feature rather than an afterthought: no player data ever leaves the device, which is useful for VR or mobile titles with unreliable connectivity. It also attempts to bridge the gap to mobile by supporting tiny 1–2 billion parameter models and offering post-install model downloads to avoid bloating app packages with multi-gigabyte weights.

Key highlights

  • Fully local inference on CPU or GPU (Nvidia, AMD, Apple Metal); no network required.
  • Built-in RAG with ANN search grounds character responses in game-specific text.
  • Simple C# API with streaming and async support via LLMAgent.Chat.
  • Cross-platform targets including PC, VR, and mobile (iOS/Android).
  • Apache 2.0 license, free for commercial use, available on the Unity Asset Store.

Caveats

  • Mobile hardware is limited to 1–2B parameter models; larger ones will not run.
  • Default models are several gigabytes, forcing mobile builds to download weights after install.
  • Android requires IL2CPP scripting backend and ARM64 target architecture.

Verdict Unity developers building narrative or simulation games where privacy, offline play, or low latency matters should try this. Skip it if you need cloud-scale models or do not work in Unity.

Frequently asked

What is undreamai/LLMUnity?
A Unity package that gives game characters offline LLM brains so players can chat with NPCs without calling the cloud.
Is LLMUnity open source?
Yes — undreamai/LLMUnity is open source, released under the Apache-2.0 license.
What language is LLMUnity written in?
undreamai/LLMUnity is primarily written in C#.
How popular is LLMUnity?
undreamai/LLMUnity has 1.7k stars on GitHub.
Where can I find LLMUnity?
undreamai/LLMUnity is on GitHub at https://github.com/undreamai/LLMUnity.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.