Scene Showcase
This room showcases various ways in which the Inworld game session can be dynamically modified, including updating the current Scene, Capabilities and the Player's Name.
Scene Change
The Scene Change showcase is an example of how you can dynamically change the Inworld Scene at runtime.
This showcase is split up into two parts:
- The first shows how changing scenes affects the behavior of characters that coexist within both scenes.
- The second shows how changing scenes affects characters that only exist in one of those scenes.
Scene Change Part 1
In Part 1 of the showcase there is a light bulb you can interact with to switch the scene from Scene Room (Daytime) to Scene Room (Nighttime) and vice versa.
When you first interact with the light bulb the game will pause for a moment as the Inworld Scene changes to Scene Room (Nighttime). Note that the environment also updates to reflect that change.
📋 Note: With the Inworld Unity SDK you can change scenes by calling
InworldController.Client.LoadScene
.
You can speak with Timekeeper and ask them about the time of day and they will respond appropriately as determined by the current Inworld Scene.
Scene Change Part 2
In Part 2 of the showcase there are two characters: Day Innequin and Night Innequin. Day Innequin is only in the Scene Room (Daytime) scene and Night Innequin is only in the Scene Room (Nighttime) scene.
You will notice if you try to speak with each character that you can only interact with them when they are in the current active scene as designated in Inworld Studio.
If you try to speak with one of the characters that isn't in the current scene (such as trying to speak with Night Innequin during the day) you get a warning in the Unity console and the character will not respond:
Update Player Name
The Update Player Name showcase shows that you can dynamically update the player's name at runtime.
Enter the new name of the player into the input field of the control panel and press Update.
📋 Note: With the Inworld Unity SDK you can update the player's name by modifying InworldAI.User.Name and then calling InworldClient.SendSessionConfig.
Now you can speak with Name Innequin to see how updating the player's name has affected the Inworld characters.
Update Capabilities
The Update Capabilities showcase allows you to dynamically toggle various global game session capabilities at runtime.
These capabilities include:
- Audio: controls whether characters have audio (TTS) for their speech.
- Emotions: controls whether characters can have dynamic emotions.
- Relations: controls whether characters can have relationships with the player.
- Lipsync: controls whether characters' lips sync with their speech.
The character at this showcase Capability Innequin is setup in studio with all the necessary options set to allow you to test these capabilities.
For emotions, the emotions slider in the Personality section is set to Dynamic emotions:
For relationships the Enable dynamic relationships toggle is enabled:
⚠️ Note: Disabling capabilities will not reset characters in Unity, but will stop the server from sending packets or data related to those capabilities in the future.
For more information on modifying the game session at runtime check out the Unitary Session demo: SampleUnitary.