Overview
Simple Unity AI Tool is a Unity Editor extension that allows developers to interact with AI models directly inside the Unity Editor. The tool can be used to generate C# scripts, ask Unity-related questions, and assist with code optimization using natural language input.
Key Features
AI-Assisted Script Generation
- Generates C# scripts based on user input
- Detects and extracts C# code blocks from AI responses
- Creates scripts directly in the Unity project
- Supports automatic attachment of scripts to GameObjects
Project Context Awareness
- Accesses information about the current Unity project
- Considers existing scripts, GameObjects, and scene structure
- Takes the active Unity version into account when generating code
- Supports drag and drop of GameObjects or scripts for additional context
Multiple AI Provider Support
- Ollama (local installation, no API key required)
- Groq (cloud-based, free tier available)
- OpenAI
- Claude (Anthropic)
- Google Gemini
- Mistral AI
- Cohere
AI providers can be selected and configured through the Settings window.
Editor User Interface
- Editor window integrated into the Unity menu
- Progress indicators during request processing
- Adjustable font size
- Conversation history retained during the editor session
- Automatic detection of generated scripts with an option to apply them
Script Management
- Scripts are created in the Assets/Scripts/ folder
- Unity compilation is handled automatically
- Prevents duplicate component attachment
- Undo support for editor actions
Typical Use Cases
- Generating example or prototype scripts
- Asking questions about Unity or C#
- Creating MonoBehaviour scripts for GameObjects
- Reviewing or refining existing code
Intended Audience
- Unity developers of any experience level
- Developers working on rapid prototyping
- Users learning Unity or C#
- Teams looking to integrate AI assistance into the Unity Editor
Requirements
AI Provider Requirements:
- Ollama: Local installation required
- Cloud-based providers: API key required
Supported providers may offer free or paid plans depending on the provider.
Basic Workflow
- Import the asset into the Unity project
- Open the tool via Window > SimpleUnityAITool
- Optionally configure an AI provider in the Settings window
- Enter a question or request
- Review and apply generated scripts if applicable
Privacy and Data Handling
- Ollama operates entirely locally
- API keys are stored locally using Unity EditorPrefs
- No telemetry or analytics are collected by the asset
- Network requests are only made to the selected AI provider
Planned Features
Context-aware editor actions, such as interacting with GameObjects or scripts via context menus, are under development and may be included in a future update.