Getting Started
We suggest that you start by reviewing the sample scenes provided in our Unity Integration package before incorporating your own scene. This will help ensure a smooth integration process.
Here is a useful walkthrough of how to get started with adding InworldAI to Unity:
1. Importing the full SDK package
⚠️ Note: If you have previously used an older version of the Inworld AI Unity SDK, We recommend you to delete the
Inworld
folder from yourAssets
folder before importing the new package, as compatibility issues may arise.
If you have obtained the package from GitHub, there are three ways methods to import the Inworld AI Unity SDK unitypackage
into your scene:
- Open Unity and navigate to
Assets
>Import Package
>Custom Package
. Then, select theunitypackage
you downloaded. - Drag the downloaded
unitypackage
into Unity's Project panel. - If you have only one instance of Unity running, double-click the downloaded
unitypackage
.
When the Import Unity Package
dialog appears, click the Import
button:
If you have obtained the package from the Unity Asset Store, you can simply click Open in Unity
in the browser.
Alternatively, within Unity, go to Window > Package Manager
, navigate to My Asset
, select AI NPC Engine v3.0
, and click Import
.
⚠️ Note: This package will contain both a tarball and a unitypackage. Once imported the Inworld plugin will need to extract it's art assets and importat a number of dependencies inworld-unity-core, Newtonsoft Json and GLTFast. This process will take approximately 5 minutes.
Innequin Sample Scene
In Assets > Inworld > Inworld.Samples.Innequin > Scenes
, you will find the 3D Innequin sample scene. This shows how Innequin is set-up with an InworldCharacter component, animation controller, and animations, as well as lipsync.
Talking to the Character
After pressing the Play button, please wait until the Inworld server has been connected. The avatar Innequin will wave at you, and then you can start speaking to the character.
⚠️ Note: If you change your audio input (i.e swap microphone input) during runtime, the new voice will not be recognized until you restart the app or re-enter Play Mode. Restarting the app will cause the change to take effect.
Typing to the Character
Press the ~
button to open or close the text input panel during runtime. While the text input panel is open, you can type sentences to the character.
Sending Narrative Actions
Input a *
at the start of any text input to send that text as a narrative action.
Speech to Text
While the text input panel is open, you can hold the Record
button to record your sentences using your microphone. Release the button to send the recorded message.
2. Importing the core package
⚠️ Note: By default, the contents under
Packages
in a Unity project are read-only. If your project references InworldAI.Lite solely through the Package Manager, please copy thePackages/Inworld.AI/Runtime/Scenes/Sample2D.unity
to yourAssets
folder.
If you only want to download the core package, you can go to the page, download the most recent .tgz
package. Then in Unity, select Window > Package Manager
, click the button +
, then select Add package from tarball
, and navigate to the path of your downloaded tarball file.
Sample 2D Scene
In Assets > Inworld > Inworld.Assets > Scenes
, you will find a sample scene Sample2D
. You can interact with the character Innequin by 2D chat panel.
This sample scene is also included in InworldAI.Lite, only this sample is accessible.
Import Text Mesh Pro
The Inworld AI Unity SDK requires "Text Mesh Pro", which is included with Unity and automatically imported by our full SDK by default. If you are opening any Unity scene inside Inworld Unity package, or opening the Inworld Studio Panel for the first time, please click Import
in the dialog for "Text Mesh Pro" if it appears.
Typing to the character
You can type sentences, and press the "Enter" or Send
button, to send a message to the character.
Speech to Text
Alternatively, you can hold down the Record
button, speak your message, and then release Record
to send a voice message.
⚠️ Note: If you are building a WebGL application, the microphone is not supported, so the
Push-to-talk
feature is not available either.
3. Explore More Features
If you are looking to perform specific actions, check out the Change User Name tutorial.
For insights into the various sample scenes, delve into the Sample Scenes section.
If you want to discover more about Inworld's versatile features, explore the Unity Play Ground chapter.
And if you are eager to seamlessly integrate your custom characters into your game, take a look at the Integrate Inworld to your Scene guide.