Skip to main content

InworldAI

In Module: Inworld.AI

This is the master data object for storing settings. It is a singleton. Please ensure that there is only one copy of it, and that it is stored under Resources folder.

InworldAI

Inspector Variables

VariableDescription
User SettingsThe current InworldUserSettings
CapabilitiesThe current Capabilities
Default ThumbnailThe current thumbnail for the default instantiated characters
Default User SettingsThe current InworldUserSettings
Controller PrefabThe current InworldController instantiation prefab
Splash ScreenThe SplashScreen instantiation prefab when starting the game
InitializedThe boolean parameter that indicates whether the package has been initialized.
MicrophoneWebGLModuleThe TextAsset for microphone support in WebGL, which will be converted to a JSON file at runtime.
MicrophoneWebGLResamplerThe TextAsset for a microphone resampler in WebGL, which will be converted to a JSON file at runtime.
VersionThe string of the SDK's current version
Debug ModeToggle for debug mode, which will display more logs in the Unity Editor console

Properties

PropertyDescription
InstanceGets an instance of InworldAI. By default, it is located at Assets/Inworld/Inworld.AI/Resources/InworldAI.asset. Please do not modify it.
UserGets/Sets the current User Setting.
IsDebugModeGets whether it's in debug mode. It could be toggled in the InworldAI.asset.
UnitySDKGet the default Client Requests that are sent to the server.
SplashScreenGets the Splash Screen prefab. It could be set in the InworldAI.asset.
ControllerPrefabGets the controller instantiation prefab. Usually used in Editor scripts.
CapabilitiesGet the current capabilities. Capabilities are the settings for loading scenes.
Default ThumbnailGet the default thumbnail for players and characters. This thumbnail is used in the demo chat panel.
InworldPathGet the path for all the Inworld assets.
ProtocolGet the protocol that will be sent in the runtime.
InitializedGet/Set if InworldAI package has been Initialized. Use this flag to avoid repetitively load packages.
VersionGet the current version of Inworld Unity SDK.

API

FunctionDescriptionParameters
LogLogs a basic type of debug message used in Inworld. If IsDebugMode is checked, the message will also be displayed in the console.log: the message to log
LogWarningLogs a warning type of debug message used in Inworld. If IsDebugMode is checked, the message will also be displayed in the console.log: the warning message to log
LogErrorLogs an error type of debug message used in Inworld. If IsDebugMode is checked, the message will also be displayed in the console.log: the error message to log
LogExceptionLogs an exception message used in Inworld. This method is used to log exceptions in Inworld, and the provided exception message will be recorded.log: The exception message to log
LogEventLogs an event to Inworld Server by reflection. It's editor only, and will not be logged in built application.attributionEvent: the client side info that will be sent to the server