Skip to main content

Util

This folder contains utility tool scripts used in InworldAI.

InworldAuth

Module: Inworld.AI. Namespace: Inworld.

This class is responsible for obtaining an access token from the Inworld runtime server.

API

FunctionDescriptionParameters
GetHeaderGenerates the header to access the token.studioServer: The server link used to obtain the access token.
apiKey: The input API key.
apiSecret: The input API secret.

InworldDateTime

Module: Inworld.AI. Namespace: Inworld.

Properties

PropertiesDescription
UtcNowGet the string of timestamp for the current UTC Time.

API

FunctionDescriptionParameters
ToStringConvert DateTime to string of timestamp.dateTime: dateTime to process.
ToDateTimeConvert the string of timestamp to DateTime."timestamp": string of timestamp to process

InworldException

Module: Inworld.AI. Namespace: Inworld. Inherited from Exceotion.

This class generates exception messages in the runtime.

InworldLog

Module: Inworld.AI. Namespace: Inworld.

This class handles logging in Inworld. If IsDebugMode is checked in the InworldController, the logs within this class will not be output.

VariableDescription
LogAreaThe TMP_Text used to display log messages at runtime.

PackageLatencyTest

Module: Inworld.AI. Namespace: Inworld.Sample.

This class is included in our InworldController prefab in the sample scene to measure the latency time from sending the last message to receiving the packets of the first message.

VariableDescription
PacketTypeThe packet type for testing (TEXT, AUDIO, etc).
IsEnabledCheck to enable package latency testing.

SingletonBehavior

Module: Inworld.AI. Namespace: Inworld.

This class is used to instantiate singleton game objects.

PropertiesDescription
InstanceGets/Sets the instance of this singleton.