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.
Inspector Variables
Variable | Description |
---|---|
User Settings | The current InworldUserSettings |
Capabilities | The current Capabilities |
Default Thumbnail | The current thumbnail for the default instantiated characters |
Default User Settings | The current InworldUserSettings |
Controller Prefab | The current InworldController instantiation prefab |
Initialized | The boolean parameter that indicates whether the package has been initialized. |
Version | The string of the SDK's current version |
MicrophoneWebGLModule | The TextAsset for microphone support in WebGL, which will be converted to a JSON file at runtime. |
MicrophoneWebGLResampler | The TextAsset for a microphone resampler in WebGL, which will be converted to a JSON file at runtime. |
Debug Mode | Toggle for debug mode, which will display more logs in the Unity Editor console |
Properties
Property | Description |
---|---|
Instance | Gets an instance of InworldAI. By default, it is located at Assets/Inworld/Inworld.AI/Resources/InworldAI.asset . Please do not modify it. |
User | Gets/Sets the current User Setting. |
DefaultUser | Gets the default User Setting |
IsDebugMode | Gets whether it's in debug mode. It could be toggled in the InworldAI.asset . |
UnitySDK | Get the default Client Requests that are sent to the server. |
ControllerPrefab | Gets the InworldController instantiation prefab. Usually used in Editor scripts. |
Capabilities | Get the current Capabilities. Capabilities are the settings for loading scenes. |
Default Thumbnail | Get the default thumbnail for players and characters. This thumbnail is used in the demo chat panel. |
InworldPath | Get the path for all the Inworld assets. |
Protocol | Get the protocol that will be sent in the runtime. |
Version | Get the current version of Inworld Unity SDK. |
Initialized | Get/Set if InworldAI package has been Initialized. Use this flag to avoid repetitively load packages. |
WebGLMicModule | Gets the microphone sampling module used in WebGL. |
WebGLMicResampler | Gets the microphone resampler module used in WebGL. |
API
Function | Description | Parameters |
---|---|---|
Log | Logs 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 |
LogWarning | Logs 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 |
LogError | Logs 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 |
LogException | Logs 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 |
LogEvent | Logs 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 |