Skip to main content

Unity Package Structure

Our comprehensive SDK is divided into two main components.

The first component is located in the Assets folder and includes all necessary assets such as fonts, logos, 3D models, along with demos and their associated scripts.This part also encompasses some of Inworld's non-core technological implementations, like Acoustic Echo Cancellation (AEC) and the Native Development Kit (NDK) protocol.

The second component is found in the Packages folder, which contains the core functionalities of Inworld. This encompasses the essential logic required for interacting with the Inworld server, facilitating the transmission and reception of text and audio. This component can be used independently. Please click here for more information.

AssetFile

Each of these folders, except for UserData, contains an Assembly Definition file. When the application is built and run, these folders are compiled into Dynamic Link Libraries (DLLs).

Here's the DLL dependency diagram:

Dependency

Packages

Inworld.AI

This folder contains the primary elements of Inworld AI (included in all packages). It builds to the Inworld.AI assembly and works autonomously without any dependencies.

If you load it into Unity's Package Manager via a URL, these files will be read-only. If you wish to customize, you can either extend these files or clone the project locally and then load it into Unity from your local copy.

Alternatively, you can directly modify the Packages/manifest.json file in your project to navigate to the location where you downloaded it.

local

  • Editor/: Contains scripts related to version updates, dependency injection, debug settings, and more.
    • Native/: Contains native webgl script for microphone support.
  • Runtime/ Contains all the scripts, prefabs and scriptable objects that used in the core package.
    • Data/: Contains scriptable objects that are used in the core package.
    • Prefabs/: Contains all prefabs.
    • Resources/: Contains the scriptable object Inworld.AI, the only data asset that are loaded at run-time.
    • Scenes/: Contains the read-only sample scene Sample2D.
    • Scripts/: Contains all the related scripts.
      • Audio/ Contains all the audio related scripts.
      • Characters/: Contains the scriptes used by characters and conversations.
      • Data/: Contains all the data structures.
        • Entities/: Contains the scripts for all the other entities used for serializing / deserializing.
        • Packets/: Contains the scripts for all the Inworld Packets.
        • ScriptableObjects/: Contains the ScriptableObjects related scripts.
      • Deprecated/: Contains the legacy files for backwards compatability.
      • Interactions/: Contains character interaction related files.
      • PlayerControl/: Contains player control related files.
      • Sample/: Contains scripts used in the sample sene.
      • UI/: Contains UI implementation scripts.
      • Util/: Contains tools, enums, Unity events, etc.
    • Textures/: Contains the sprite for default avatar and Inworld logo.
    • UnityWebSocket/: Contains the websocket protocol we forked based on this repo.
      • Plugins/: Contains the jslib plugin specifically for WebGL, for other platform, we just use C#'s System.Net.WebSockets.
      • Scripts/: Contains web socket related scripts.
  • Test/: Contains test files for both Editor and Runtime environments.

Assets

Editor

This folder contains scripts for SDK import/export workflow.

Inworld.Assets

  • This folder contains various types of resources that would be triggered by Inworld server events. It requires Inworld.AI and Unity.TextMeshPro assemblies, and builds to Inworld.Assets assembly.

    • Animations/: Contains both 2D and 3D animations, as well as the lipsync and emotion morph mapping data.
      • 2D/: Contains all the 2D emote animations.
      • 3D/: Contains all the 3D animation controllers, avatars and their related animations.
      • Facial/: Contains all the Facial animation related scriptable objects, such as facial emotion map, lipsync map, etc.
    • Fonts/: Contains the Inworld's default fonts.
    • Materials/: Contains the Inworld's premade materials.
    • Prefabs/: Contains all prefabs.
      • 2D/: Contains all the 2D prefabs used in the full SDK.
      • 3D/: Contains all the 2D prefabs used in the full SDK.
    • Scenes/: Contains the sample scene AudioTest for developers to configure their microphone inputs, and an editable Sample2D, since the one in Inworld.AI is read-only.
    • Scripts/: Contains all the related scripts.
      • Animation/: Contains all the animation related scripts.
        • Body/: Contains the body animation scripts.
        • Facial/: Contains the facial and lip syncing related animation scripts
      • CharacterHandler/: Contains the implementation in the 3D characters of the full SDK.
      • PlayerControl/: Contains the player control related scripts, both 2D and 3D.
      • Sample/: Contains the scripts used in separate samples.
      • UI/: Contains the scripts used for chat panel and bubbles.
    • Textures/: Contains all the 2D assets such as chat bubbles, banners, emojis, etc.
      • Banners/: Contains the banner png pictures.
      • Bubbles/: Contains the chat bubbles.
      • Emotion/: Contains the emotion pictures.
      • Logos/: Contains Inworld logos with different colors.
      • RuntimeUI/: Contains the button icons in the sample.

Inworld.Editor

  • This folder contains all the editor extension related resources. It requires Inworld.AI, Inworld.Assets, Inworld.RPM and Inworld.Innequin assemblies, and builds to Inworld.Editor assembly.
    • Data/: Contains the InworldEditor scriptable object.
    • Editor/: Contains all the editor extension related scripts.
      • Status/: Contains all the editor status related scripts.
      • Util/: Contains the untility related scripts for Inworld editor extension.
    • Prefabs/: Contains the editable prefab of InworldController, which also includes AEC audio sampling features by default.

Inworld.Native

  • This folder contains the native implematation related files. It requires Inworld.AI, Inworld.Assets, Inworld.Editor and Inworld.RPM assemblies, and it builds to Inworld.NDK assembly.
    • AEC/: Contains Acoustic Echo Cancellation (AEC) related models and scripts.
      • Plugins/: Contains AEC's native plugin files for all supported platforms.
    • Scripts/: Contains the NDK related legacy scripts.
    • Sentis~/: Contains the hidden client side AI models and related scripts empowered by Sentis. It's hidden in the Unity Editor by default.
    • VAD/: Contains Voice Activity Detection (VAD) related models and scripts.
      • Editor/: Contains a script for copying it into StreamingAssets folder.
      • Plugins/: Contains the model and its related scripts.

Inworld.Samples.Innequin

  • This folder contains all the files of Inworld Integration for Innequin. It requires Inworld.AI and Inworld.Assets assemblies, and it builds to Inworld.Innequin assembly.
    • Data/: Contains the FaceTransformData that specifically for Innequin avatars, separated from default one.
    • Materials/: Contains the Innequin model or the sample scene related material assets.
      • AnimShader/: Contains the animated shader for rendering emotes.
      • Avatar/: Contains the avatar related materials.
      • Env/: Contains the materials used for background environment.
    • Models/: Contains the Innequin .fbx based model.
    • Prefabs/: Contains Innequin related prefabs.
      • UI/: Contains the UI related prefabs.
    • Scenes/: Contains the sample scene InnequinBasic.
    • Scripts/: Contains Innequin related scripts, mainly for how to process facial animation data for Innequin.
    • Shaders/: Used for generating facial materials.
    • Textures/: Contains Innequin related textures.
      • faceExports/: Contains all the facial animation sprites.
      • MaterialTextures/: Contains all the textures for materials.

Inworld.Samples.RPM

  • This folder contains all the files of Inworld Integration for Ready Player Me avatars. It requires Inworld.AI and Inworld.Assets assemblies, and it builds to Inworld.RPM assembly.
    • Avatars/: Contains the .glb format models used in the sample scenes.
    • LightData/: Contains the pre-baked lightmap for sample scenes.
    • Prefabs/: Contains Innequin related prefabs.
      • 2D Interaction/ Contains 2D prefabs, including chat bubbles and other UI canvas objects that appear as screen overlays.
      • 3D Interaction/ Contains 3D prefabs, including chat bubbles that appear in the world spaces.
        • UI/: Contains the 3D prefabs used for rendering UI.
      • Character/ Contains Inworld Character prefabs templates that based on Ready Player Me avatars.
    • Scenes/: Contains the sample scene SampleBasic.
    • Scripts/: Contains the scripts that used in the RPM based samples.
      • UI/: Contains the scripts that are used in the UI of the demos.
    • Shaders/: Contains the shaders used for rendering rooms and monitors in the sample scene.
    • Thumbnails/: Contains RPM based avatar thumbnails that used in the sample scene.

UserData

  • This directory contains data generated by Inworld.Editor for different users of Inworld Studio. Each Inworld Studio user who utilizes the Unity-based Inworld Studio Panel will have a separate folder created, identified by their Inworld default username. This will be referred to as {USER_NAME} for simplicity.

    • {USER_NAME}/: Contains the user data by that user.
      • Avatars/: Contains this user's locally stored 3D avatars.
      • GameData/: Contains the model or the sample scene related material assets.
      • Prefabs/: Contains the generated various types of InworldCharacter prefabs.
      • Thumbnails/: Contains the generated avatar thumbnails.