Skip to main content

⏱️ 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​
  1. Go to the OpenAI API Keys page.
  2. Create a new secret key & copy the new key somewhere safe.
  3. Enter the new key into Wingman's API key field.
No existing account​
  1. Go to https://platform.openai.com/signup.
  2. Create an account providing your details.
  3. You should now see the overview screen.
  4. Go to View API keys.
  5. Create a new secret key & copy the new key somewhere safe.
  6. Enter the new key into Wingman's API key field.

Setup OpenAI billing info​

  1. Go to billing overview.
  2. Click "Start payment plan".
  3. Enter your details to setup the payment plan.
  4. (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

caution

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 NameDescription
API UrlURL to use for requests. This can be changed to a proxy url
API KeyYour API key for OpenAI API requests.
Default TemperatureThe default temperature for requests (read more)

DALL-E Settings​

Setting NameDescription
Generate EndpointEndpoint for generation requests.
Edit EndpointEndpoint 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.