Skip to main content

Getting Started

Our Unity Integration package comes with two example InworldScenes and three example InworldCharacters that you can interact with out of the box (without authentication)

The InworldScene celeste-spaceship contains the character Celeste, and the InworldScene olympus-theatre contains the characters Zeus and Hermes. In this section, let's set up the environment step by step.

1. Importing the Package

You can choose any of the following to import the Inworld AI Unity SDK unitypackage into your scene.

  • Open your project in Unity and import the Asset Package file at Assets > Import Package > Custom Package
  • Navigate to the unitypackage you downloaded to import.
  • Drag the unitypackage you downloaded into Unity's Project panel.
  • Simply double-click the downloaded unitypackage if you have only one Unity instance running.

When the import dialog appears, select Import:

Import

⚠️ Note: If you've used an old version of Inworld AI Unity SDK before, it is recommended that you delete the folder Inworld.AI in your Asset folder before importing, as the new package may not be compatible.

2. Opening the Inworld Studio Panel

You can do either of the following to open the Inworld Studio Panel.

  • At the top menu, click Inworld > Studio Panel.
  • Right click anywhere inside the Assets folder, then click Inworld Studio Panel.

OpenPanel

⚠️ Note: The Inworld AI Unity SDK requires Text Mesh Pro, which is inside Unity but not imported by default. If it is the first time you are opening the Inworld Studio Panel, please click Import if the dialog for the Text Mesh Pro

3. Choosing Your Scene and Character

There is a drop down field for you to switch InworldScenes. When switching InworldScenes, all characters will also be replaced.

By clicking the thumbnail of the InworldCharacter, Unity will navigate to the model you've chosen.

You can drag the model into the Unity Scene. Data and components will be installed to that avatar when you release dragging.

StudioPanel

⚠️ Note: Whenever you drag an InworldCharacter into a Unity Scene, all the InworldCharacters that do not belong to the current InworldScene will be deleted! If the InworldCharacter that you are dragging does not belong to the current scene, then it will be deleted.

By default, the Current Scene will be displayed as a gizmos in Scene View.

CurrentScene

4. Configure Characters in the Scene

Once the InworldCharacter gameObject is in the scene, you can modify the character. Besides Unity's normal features such as Translating, Rotating, you can also adjust the character's field of view, and/or sight distance.

⚠️ Note: After you drag the avatar into the Unity Scene, you need to click the object in the Hierarchy to proceed with the operations above.

ConfigureModel

5. Add a Player Controller

InworldCharacters can only be communicated with by InworldController's Inworld Player gameObject. It can be set to any kind of gameObjects. If you did not implement your own Player Controller, You can simply click Add Player Controller into Scene to generate one.

⚠️ Note: The PlayerController prefab made by Inworld AI contains a main camera. By adding a PlayerController, it will delete the current main camera in your scene. It also contains an EventSystem. Please make sure to keep only one EventSystem if you have already created one.

**PlayerController**

If you have implemented your own logic for player control, then you can drag that gameObject into InworldController's InworldPlayer field.

An InworldController will be generated whenever any InworldCharacter is dragged into the scene. It is a Singleton gameObject, so you should ensure that there is only one copy in your scene.

OwnController

6. Runtime

Congratulations, you're all set! Now, let's click the Play button to see the behavior:

Please note the following if you are using our default PlayerController:

  1. You can use the W, A, S, and D keys on your keyboard to move around
  2. You can use the Q and E keys on your keyboard to move up and down
  3. By single clicking the Left Mouse Button, you can look around
  4. You can talk to the character that you are looking at using microphone
  5. You can click the ~ key to open a text panel. This allows you to type text or hold the record button to send verbal responses