Quick Setup Guide
Downloading and Importing AI Toolbox
First of all, you need to download and import AI Toolbox into your project.
- In Unity, go to Window ▶︎ Package Manager;
- On the top left, please locate the Packages drop down menu. Select My Assets item there. You’ll find AI Toolbox for ChatGPT and DALL·E among your assets. Choose the version you’d like to import;
- Click Download (if it is not downloaded yet);
- Click Import.
- Click Import again.
After the import is complete, you will need to paste your OpenAI API key into the Project Settings.
API Key Generation
To use the AI Toolbox, you must first generate an API key for the ChatGPT API:
- Sign up or log in to your OpenAI account: https://platform.openai.com/.
- Navigate to the “View API Keys” section in your account dashboard.
- Click “Create new secret key” and copy the generated key.
API Key Setup in Unity
Once you have generated the API key, you need to set it up within Unity:
- Open your Unity project.
- Click on “Edit” in the top menu, then select “Project Settings.”
- In the Project Settings window, navigate to the “AI Toolbox” tab.
- Paste your API key into the “API Key” field.
⚠️ The API key is stored in encrypted form in the following file:
UserSettings/AiToolboxSettings.asset. When sharing your project with others, be sure to exclude the “UserSettings” directory to prevent unauthorized use of your API key.
The Welcome scene is a good place to check if your API key is valid, also to see some basic instructions how to start working with AI Script Generator.