Install
Get the asset from the Unity Asset Store here: https://assetstore.unity.com/packages/tools/generative-ai/ai-commander-281306
Last updated
Get the asset from the Unity Asset Store here: https://assetstore.unity.com/packages/tools/generative-ai/ai-commander-281306
Last updated
Open the package manager (Windows -> Package Manager)
Click the plus icon on the upper left-hand corner, then Add package by name
.
Package Name: com.unity.nuget.newtonsoft-json
Version: 3.2.1
Click the Add
button.
Create a developer account with Open AI, and get an API key here: https://platform.openai.com/api-keys
Clone the Server Project from this GitHub repo: https://github.com/Danejw/ai-python-server
Press Ctrl+Shift+P
(or Cmd+Shift+P
on macOS) to open the Command Palette.
Type "Python: Select Interpreter" and press Enter.
A list of available Python interpreters will appear.
Find the interpreter corresponding to Python 3.11.8 and select it.
Open the integrated terminal by pressing Ctrl+`
(backtick) or by navigating to View -> Terminal -> New Terminal
from the top menu.
Once you're in the correct directory, run the following command to install all the dependencies:
Create a file called .env
with the contents of you OPENAI_API_KEY
, like so:
(replacing your-api-key with the OpenAI API Key provided by Open AI)
While the server is running, return to Unity. Play the demo scene, and interact with the demo scene by recording your voice or typing in a prompt and clicking send.