A new AI Assistant has been added. You can access it via the top menu bar: Help → AI.The AI can:
Answer your questions
Help you operate the editor
The AI consists of two components:
AI Smart Router – The central dispatch hub. It receives your messages, intelligently selects which AI service to use for replies, and operates the tools you provide to complete tasks.
Local Inference Engine – Runs AI models directly on your own computer. No internet connection required, protecting your privacy.
Both components are optional, resulting in four possible combinations:
Smart Router
Local Engine
Behavior
On
Off
AI calls cloud or local large models for replies and tool operations.
Off
On
AI replies only via the local engine, without using any tools.
On
On
AI replies and operates tools via the local engine.
Off
Off
AI service is disabled.
Click Help → AI in the top menu bar to open the AI feature. The configuration panel will appear by default.
In the "AI Service Configuration" section, select:
Cloud Service – Uses online AI (e.g., OpenAI, Claude). Requires internet and an API key. Offers stronger intelligence. These services usually require paid subscriptions.
Local Service – Uses AI models on your own computer. No internet required, protects privacy. No usage fees, but requires higher computer performance.
Recommendation: If this is your first time, choose "Local Service".
Select Local Service Provider
LLM for Unity – The built-in local AI engine for this game (recommended)
Ollama – Choose this if you have Ollama installed
LM Studio – Choose this if you have LM Studio installed
Download and Select a Model FileIf you don't have a model file, download one from:
Hugging Face – Hugging Face
ModelScope – ModelScope
Tip: Search for GGUF-format model files, e.g., Qwen 7B Instruct GGUF or Llama 3 8B GGUF.After downloading, click the "Browse" button and select the downloaded .gguf model file.Enable Remote ServiceYou must check "Enable Remote Service", otherwise the AI will not work.
Port: Default 13333 – generally no need to change
API Key: Optional; if set, it must match the configuration in UnAI
Configure Performance Parameters
Threads – How many CPU cores to use for inference. Recommended: half of your CPU core count (e.g., set to 4 for an 8-core CPU).
GPU Layers – How many model layers to load into GPU memory (0 = CPU only). If you have a graphics card, set to 999 (load all). If no GPU, set to 0.
Context Size – How much conversation history the AI can "remember". Range: 4096 to 8192. Higher values consume more memory.
Parallel Prompts – How many requests to process simultaneously. Keep at 1 unless you intend to serve multiple people.
Warning: Setting GPU layers too high may cause insufficient video memory. Adjust carefully based on your graphics card specifications.
Load the ModelClick the "Reload Model" button and wait for the model to load.
Loading time depends on model size and computer performance – typically 5 to 60 seconds.
Status showing "Loaded" indicates success.
Configure the following parameters:
Provider – Choose OpenAI, Anthropic, Gemini, or Custom
API Key – The key obtained from the service provider's website (required)
Model Name – The model to use, e.g., GPT-5.6 Sol
Base URL – Service endpoint; usually keep the default
Privacy Note: Your API Key is stored only on your own computer and is never uploaded to any server. Please keep it safe to prevent leaks and unnecessary losses.
These parameters control the AI's "personality" and output style:
Temperature – Controls randomness/creativity. Higher = more creative but may go off-topic. Lower = more conservative and deterministic but may become rigid.
Top-P – Controls the word selection range. Higher = richer vocabulary. Lower = more focused vocabulary.
Repeat Penalty – Prevents repetition. Higher = more varied language. Lower = may repeat words.
Top-K – Limits candidate words to the top K. Higher = richer vocabulary. Lower = more conservative vocabulary.
Max Response Length – Maximum length of a single AI reply. Higher = longer replies. Lower = shorter replies.
Click the "Apply Configuration" button to save all settings.
Performance Parameters
Threads – How many CPU cores the AI uses for thinking. More threads = faster inference but higher CPU usage. Recommended: half of physical cores.
GPU Layers – Loads model parameters into GPU VRAM. GPU is faster than CPU for AI computations. Set to 0 for CPU only, 999 for full GPU load (requires sufficient VRAM). If the game stutters or crashes, reduce this value.
Context Size – How much dialogue history the AI remembers (in tokens). Example: 4096 ≈ ~3000 Chinese characters. For daily chat, 4096 is sufficient; for longer conversations, set to 8192.
Inference Parameters
Temperature – Controls reply randomness. Range: 0.0 – 2.0
Top-P (Nucleus Sampling) – Selects words proportionally from the highest-probability set. Range: 0.0 – 1.0. Example: Top-P = 0.9 means selecting from words whose cumulative probability reaches 90%. Recommended: keep between 0.85 – 0.95 together with temperature.
Repeat Penalty – Penalizes repeated words/phrases. Range: 0.0 – 2.0
Top-K – Selects only from the top K highest-probability words. Recommended: 30 – 50. Note: Top-P is generally sufficient; adjust one of the two.
Max Response Length (Max Tokens) – Limits the maximum length of a single reply. Recommendations: Short chat 128–256, daily chat 512–1024, long text generation 2048+.
Steps
Complete the configuration and ensure the status shows "Loaded".
Close the configuration panel.
Enter a message in the chat input box.
Press Enter to send.
Menu FunctionsIn the top-right corner of the chat interface, the More (three dots) button provides:
Clear – Clear chat history
Config – Open AI configuration panel
Show History File – Open the folder containing chat history files
Right-click on an AI reply message to Copy its content.
You can also select a portion of the AI's reply with your mouse to copy the highlighted text.
Troubleshooting & FAQ
Issue
Suggestion
File not found
Model path is incorrect. Re-select the model file.
Load failed
Model file is corrupted. Re-download the model file.
Startup failed
Insufficient VRAM/RAM. Reduce GPU layers or context size.
Load timeout
Model is too large or computer performance is insufficient. Use a smaller model or wait longer.
Input box unavailable
Model not loaded – check if status shows "Loaded". If you just sent a message, the AI may be thinking – wait for its reply.
Request timeout
Model is still loading – wait for it to complete.
Port already in use
Another program is using the port – change the port number and reload.
Connection failed
Remote service is not enabled – check "Enable Remote Service".
Game stutters
Threads/GPU layers are set too high – reduce them.
Insufficient VRAM
Context or model is too large – reduce context size or use a smaller model.
Reply too slow
Computer performance is insufficient – use a smaller model or reduce parameters.
Future PlansWe will later provide a Tools list and permission control feature, allowing users to customize which tools the AI can use and freely extend tool types.
The following operations have been added:
L – Fix/Pin object
H – Hide object
Right-click – Toggle Snapable (snap capability on/off)
When creating a new project, you will now be prompted to enter a project description and upload a preview image.This will allow the AI to better understand your project in future versions.