β±οΈ Getting Started
Setupβ
System Requirementsβ
- Unity Compatibility: 2020.3 or later
- Supported Platforms: PC, Mac
Installation Stepsβ
Importβ
Open Unity. Download and import the Wingman
package in the Unity Package Manager window.
OpenAI API Setupβ
Existing accountβ
- Go to the OpenAI API Keys page.
- Create a new secret key & copy the new key somewhere safe.
- Enter the new key into Wingman's API key field.
No existing accountβ
- Go to https://platform.openai.com/signup.
- Create an account providing your details.
- You should now see the overview screen.
- Go to View API keys.
- Create a new secret key & copy the new key somewhere safe.
- Enter the new key into Wingman's API key field.
Setup OpenAI billing infoβ
- Go to billing overview.
- Click "Start payment plan".
- Enter your details to setup the payment plan.
- (optional) Go to Billing > Usage Limits and set a usage limit on your API usage.
Add API keyβ
Once imported, open the Tools/Wingman/Setup Integrations
menu in the Unity Editor.
Add your OpenAI API key (usually beginning sk-***
) in the API Key
field
Your API key is stored in PlayerPrefs. More information at https://docs.unity3d.com/ScriptReference/PlayerPrefs.html
It is highly recommended you clear your API key with the "Clear API Key" button in the Codematik/Integrations/OpenAI project settings.
For more information on API keys see here.
You are now ready to use Wingman, your new AI Unity assistant.
Configurationβ
Setup Integrationsβ
Use the Tools/Wingman/Setup Integrations
menu item to setup your API integration settings.
Supported Settingsβ
OpenAI Settingsβ
Setting Name | Description |
---|---|
API Url | URL to use for requests. This can be changed to a proxy url |
API Key | Your API key for OpenAI API requests. |
Default Temperature | The default temperature for requests (read more) |
DALL-E Settingsβ
Setting Name | Description |
---|---|
Generate Endpoint | Endpoint for generation requests. |
Edit Endpoint | Endpoint for edit requests. |
Setup Wingmanβ
Use the Tools/Wingman/Setup Wingman
menu item to configure the Wingman assistant.
API Keysβ
Concerned about API keys? Or about storing an API key in plaintext? We understand, this is a loaded topic so here's some advice:
Your open API key is a facsimile of a password. It allows anybody access to your OpenAI account without your username or password. Therefore you should treat your API key as you treat your passwords.
We store your API key in PlayerPrefs which are fragile by default. This is done for multiple reasons, the most important being, it is very easy to clear your PlayerPrefs, and they are stored offline (and won't be committed to your games repo!). If you ever sell your computer, or if you use a public computer, it is of paramount importance to clear your API key (instructions provided above).
We also highly advise never to share your raw API key in your game executable. If you intend to have characters speak game dialogue you should prefer a fully offline model. This asset, and many other assets which use an online API to generate character dialogue, are not suitable for AI characters in production.