Help Setting Up Dialogue System in VR (XR Interaction Toolkit)

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Am-Jo
Posts: 4
Joined: Tue Apr 15, 2025 4:44 pm

Help Setting Up Dialogue System in VR (XR Interaction Toolkit)

Post by Am-Jo »

Hi All,

I'm trying to set up a dialogue system in a VR environment using the XR Interaction Toolkit. I downloaded the XRI Dialogue System Unity package, but much of the functionality seems deprecated, and I haven't been able to run a working scene to understand how it all fits together.

I watched the videos linked on this website and one of VR specifically:
—but they don’t walk through setting up a full scene or getting the system working in VR.

I'm specifically looking for step-by-step instructions or a guide (video, doc, repo—anything current and complete) that covers how to:

1. Set up player response/choice UI in VR
2. Set up NPC responses
3. Coordinate dialogue flow (adding dialogue, setting triggers, etc.)

I did learn that the Response Menu Panel can be made a child of the ray controller (e.g., on the wrist), but I haven’t been able to get the full system working as expected.

Is there a current, working example or tutorial that walks through this process from start to finish?

Thanks in advance!
User avatar
Tony Li
Posts: 23250
Joined: Thu Jul 18, 2013 1:27 pm

Re: Help Setting Up Dialogue System in VR (XR Interaction Toolkit)

Post by Tony Li »

Hi,

Are you planning to use VR Interaction Framework (VRIF) or the XR Interaction Toolkit package?
Am-Jo
Posts: 4
Joined: Tue Apr 15, 2025 4:44 pm

Re: Help Setting Up Dialogue System in VR (XR Interaction Toolkit)

Post by Am-Jo »

The XR Interaction Toolkit.
User avatar
Tony Li
Posts: 23250
Joined: Thu Jul 18, 2013 1:27 pm

Re: Help Setting Up Dialogue System in VR (XR Interaction Toolkit)

Post by Tony Li »

Got it, thanks! I'll try to have an updated XR Interaction Toolkit example on the Extras page by tomorrow. It's a constant game of catch-up with that team since they don't do a good job of backward compatibility/stability.
Am-Jo
Posts: 4
Joined: Tue Apr 15, 2025 4:44 pm

Re: Help Setting Up Dialogue System in VR (XR Interaction Toolkit)

Post by Am-Jo »

Thank you! I really appreciate it. I'm mostly struggling with separating out the NPC and Player dialogue UI which isn't explained properly in the existing content (imo).

I am able to get the dialogue system running but things are in screen-space overlay and simply changing it to world-space isn't working.
User avatar
Tony Li
Posts: 23250
Joined: Thu Jul 18, 2013 1:27 pm

Re: Help Setting Up Dialogue System in VR (XR Interaction Toolkit)

Post by Tony Li »

Hi,

I updated the XRIT example scene for XRIT version 3.0.8. It's available on the Extras page and here: direct download

A README.txt file explains how it's set up, as well as a __README__ GameObject in the scene itself.
Am-Jo
Posts: 4
Joined: Tue Apr 15, 2025 4:44 pm

Re: Help Setting Up Dialogue System in VR (XR Interaction Toolkit)

Post by Am-Jo »

Thank you for this — it works great. I've been experimenting with it over the past couple of days and have a few questions.

My VR experience spans multiple scenes, so I’m looking to modify the existing template to fit that structure. However, I’m a bit confused by the setup shown in the example template.

In the example, the Dialogue Manager contains the

Code: Select all

DialogueSystemController
script. For the Dialogue UI, it uses the Basic Standard Dialogue UI, and for the Default Canvas field, a Screen Space Overlay Canvas is assigned.

Here's how the structure looks in the Dialogue Manager:

Code: Select all

Dialogue Manager
├── Screen Space Overlay Canvas
│   └── Basic Standard Dialogue UI
│       ├── Alert Panel
│       └── QTE
└── Moving World Space Canvas
    └── Dialogue Panel
        ├── NPC Subtitle Panel
        ├── PC Subtitle Panel
        ├── Response Menu Panel
        └── Text Field UI
My confusion is around the presence of two NPC Subtitle Panels — one under the Dialogue Manager and another inside the NPC prefab. These seem to function independently. Can we keep just one? Specifically, can I remove the one from the Dialogue Manager and only use the one in the NPC prefab?

The reason I ask is because in my project, NPCs are prefabs and used across multiple scenes. It would be much cleaner and more manageable if each NPC had its own world-space canvas to display subtitles, rather than duplicating world-space canvases per scene or within the Dialogue Manager.

Additionally, since the game spans multiple scenes and the player moves around a lot, it makes more sense for the Response Menu Panel to appear near the player instead of in a fixed position (as it is in the example setup).

Is it possible to make the Response Menu Panel a child of a world-space canvas that's part of the Player object?

Here’s the structure I’m aiming for:

Code: Select all

NPC
├── NPC Trigger Canvas
└── NPC Subtitle Panel

Player
└── Response Menu Panel
Then, the flow would go like this:
- The player clicks the “Talk” button on the NPC.
- The button disappears.
- The NPC Subtitle Panel begins showing the conversation.
- The player’s Response Menu Panel is used to continue the dialogue.

I’m just not sure how the Dialogue Manager should be structured to support this setup.

I also came across this post: https://www.pixelcrushers.com/phpbb/vie ... php?t=2096, and while I tried using the

Code: Select all

DialogueActor
script as suggested, I couldn’t get it to work properly.

Ultimately, I’m looking for guidance on how to build this structure correctly for a multi-scene VR project using NPC prefabs and a player-centered UI. Any advice would be greatly appreciated.
User avatar
Tony Li
Posts: 23250
Joined: Thu Jul 18, 2013 1:27 pm

Re: Help Setting Up Dialogue System in VR (XR Interaction Toolkit)

Post by Tony Li »

Hi,

Multi-scene is no problem. Conversations must run through a dialogue UI. For your VR project, leave the Basic Standard Dialogue UI assigned to the Dialogue Manager GameObject's Display Settings > Dialogue UI field.

First, some background info: The dialogue UI coordinates what content is displayed to the player during conversations. By default, the dialogue UI uses its own subtitle panels. However, actors can also specify that they should use custom subtitle panels that exist apart from the dialogue UI. To do this, the actor's GameObject needs a Dialogue Actor component which you can point to a custom subtitle panel. For an explanation of how that gets set up, please see: How To: Show Overhead Conversation Bubble Text.

With that background info in mind, there are 3 general ways to show dialogue in VR:

1. Use the Dialogue Manager's dialogue UI in a screen space - camera canvas. This will display it as an overlay that appears in front of the player, kind of like a HUD. To do this, set the Dialogue Manager's Canvas to Screen Space - Camera. Use a little script with a Start() method that assigns the scene's VR camera to the canvas. Set the canvas's Plane Distance to the distance away from the player that it should appear. A Plane Distance of 1 will put the dialogue UI one meter away from the player.

2. Or add custom world space subtitle panels to actors. If you examine Private Hart in the VR Example scene, you'll see that he has a Dialogue Actor component. Its Dialogue UI Settings tell Private Hart to use a custom world space subtitle panel that's positioned above his head.

3. Or reuse the same panel but move it to a relevant position for each conversation. The VR Example scene does this, too. In the scene, I moved the dialogue UI's Dialogue Panel into its own world space canvas, as you noted. A script on each NPC (Private Hart in this case) moves that world space canvas to a position near the NPC.

Note: If Private Hart didn't have a Dialogue Actor component telling it to use its own custom subtitle panel (as described in #2 above), his subtitle text would appear in the world space Dialogue Panel described in #3.
Post Reply