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

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: Includes reference files related to WebGL microphones.

  • Editor/: Contains scripts related to version updates, dependency injection, debug settings, and more.
  • 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 sample scene Sample2D.
    • Scripts/: Contains all the related scripts.
      • 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.
      • 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.

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.
    • Prefabs/: Contains all prefabs.
    • Scenes/: Contains the sample scene AudioTest, for developers to configure their microphone inputs.
    • Scripts/: Contains all the related scripts.
    • Textures/: Contains all the 2D assets such as chat bubbles, banners, emojis, etc.

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.
    • Editor/: Contains all the editor extension related scripts.
    • Resources/: Contains the scriptable object InworldEditor, which is used for editor integration.

Inworld.NDK

  • This folder contains the Inworld NDK, and the Acoustic Echo Cancellation (AEC) Implematation related files. It requires Inworld.AI, Inworld.Assets, Inworld.Editor and Inworld.RPM assemblies, and it builds to Inworld.NDK assembly.

    • Editor/: Contains the editor extension related scripts ProtocolSwitcher, for developers to switch protocol automatically in Unity menu.
    • Plugins/: Contains the native plugin files for all supported platforms.
    • Scenes/: Contains the sample scene NDKSampleBasic.
    • Scripts/: Contains all the related scripts.
      • AEC/: Contains Acoustic Echo Cancellation (AEC) related scripts.
      • NDK/: Contains NDK implementation 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.
    • Models/: Contains the Innequin .fbx based model.
    • Prefabs/: Contains Innequin 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.
    • Materials/: Contains the model or the sample scene related material assets.
    • Plugins/: Contains the native plugin files for loading .glb models.
      • ThirdParty/ Contains the related third party plugins.
        • GLTFUtility/ Contains the plugins for rendering .glb models in both editor and run-time.
        • NewtonSoftJson/ Contains scripts that are required by GLTFUtility for serializing/deserializing JSON data. If you encounter an error that prevents the build process, please consider deleting this folder and fetching com.unity.nuget.newtonsoft-json from Unity's package manager.
    • 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.
      • 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.
    • 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.