Anyone got Dialog System working with VRIF?
Anyone got Dialog System working with VRIF?
Hi folks,
I'm using Bearded Ninja's excellent VR Interaction Framework and am trying to integrate DS with it. However, I'm really struggling to get DS to render anything to the display.VRIF uses a CenterEyeAnchor for the render camera, but as soon as I run the project, but DS ends up pointing to CameraCaster as soon as the project runs.
Does anyone have any experiences or advice to share please? I'm at my wits end with this one!
Many thanks,
Jason
I'm using Bearded Ninja's excellent VR Interaction Framework and am trying to integrate DS with it. However, I'm really struggling to get DS to render anything to the display.VRIF uses a CenterEyeAnchor for the render camera, but as soon as I run the project, but DS ends up pointing to CameraCaster as soon as the project runs.
Does anyone have any experiences or advice to share please? I'm at my wits end with this one!
Many thanks,
Jason
Re: Anyone got Dialog System working with VRIF?
Hi,
Several projects use VRIF with the Dialogue System, so rest assured that it's quite possible.
What do you mean by "DS ends up pointing to the CameraCaster"? Assuming you're using Unity UI (such as the Standard Dialogue UI system), are you using a world space canvas or screen space - camera canvas?
If you're using a world space canvas, it should appear. Make sure the world space canvas is on a layer in the CenterEyeAnchor camera's culling mask.
If you're using a screen space - camera canvas, check the plane distance. It might be too far.
Several projects use VRIF with the Dialogue System, so rest assured that it's quite possible.
What do you mean by "DS ends up pointing to the CameraCaster"? Assuming you're using Unity UI (such as the Standard Dialogue UI system), are you using a world space canvas or screen space - camera canvas?
If you're using a world space canvas, it should appear. Make sure the world space canvas is on a layer in the CenterEyeAnchor camera's culling mask.
If you're using a screen space - camera canvas, check the plane distance. It might be too far.
Re: Anyone got Dialog System working with VRIF?
Thanks Lee - it's good to know I'm not attempting the impossible! I've been able to get at least a hello world message to appear using a world space canvas on a cube within CentreEyeAnchor for a floating message.
Even though I've assigned CentreEyeCamera to DialogManager, at runtime it's replaced with CameraCaster. Changing it back at runtime to CentreEyeCamera lets Dialog Manager render to the headset again, which is the current source of frustration for me.
I've downloaded your demo VR scene and am using that as a guide, and want to get similar usage. I suspect VRIF must be making the camera change when it's run.
I also have your Quest Manager plugin too - do you know if anyone managed to integrate that with VRIF? I thought I'd be better off starting with Dialog Manager until I know what I'm doing.
Even though I've assigned CentreEyeCamera to DialogManager, at runtime it's replaced with CameraCaster. Changing it back at runtime to CentreEyeCamera lets Dialog Manager render to the headset again, which is the current source of frustration for me.
I've downloaded your demo VR scene and am using that as a guide, and want to get similar usage. I suspect VRIF must be making the camera change when it's run.
I also have your Quest Manager plugin too - do you know if anyone managed to integrate that with VRIF? I thought I'd be better off starting with Dialog Manager until I know what I'm doing.
Re: Anyone got Dialog System working with VRIF?
Hi,
Quest Machine and the Dialogue System both use plain old Unity UI, so once you resolve the issue that's impacting the Dialogue System everything should fall into place for Quest Machine, too. Note that the dialogue UI and quest log window will check if the scene has an EventSystem. If not, it will add a default one. Since you're using VRIF, you probably don't want this. You can untick the UIs' "Add EventSystem If Needed" checkboxes or, better yet, make sure the scene has a VRUISystem EventSystem.
Let's just check a couple of VRIF-specific things:
1. Does your scene have an EventSystem, such as VRIF's VRUISystem?
2. Have you added a VRCanvas component to the Dialogue Manager's canvas? (This will add/assign the event camera if it's not already added/assigned.)
3. Is your CenterEyeAnchor tagged as "Main Camera"?
-Tony
Quest Machine and the Dialogue System both use plain old Unity UI, so once you resolve the issue that's impacting the Dialogue System everything should fall into place for Quest Machine, too. Note that the dialogue UI and quest log window will check if the scene has an EventSystem. If not, it will add a default one. Since you're using VRIF, you probably don't want this. You can untick the UIs' "Add EventSystem If Needed" checkboxes or, better yet, make sure the scene has a VRUISystem EventSystem.
Let's just check a couple of VRIF-specific things:
1. Does your scene have an EventSystem, such as VRIF's VRUISystem?
2. Have you added a VRCanvas component to the Dialogue Manager's canvas? (This will add/assign the event camera if it's not already added/assigned.)
3. Is your CenterEyeAnchor tagged as "Main Camera"?
-Tony
Re: Anyone got Dialog System working with VRIF?
1. Does your scene have an EventSystem, such as VRIF's VRUISystem?
Yes
2. Have you added a VRCanvas component to the Dialogue Manager's canvas? (This will add/assign the event camera if it's not already added/assigned.)
Yes. I assume you mean the default canvas object that is a child of the Dialog Manager object.
3. Is your CenterEyeAnchor tagged as "Main Camera"?
Yes
With the above settings, when the project runs and the 'Press space to interact' dialog is visible on the Game window, but not on the VR headset (Oculus).
On Dialog Manager, Canvas object, the rendermode is set to Screen Space - overlay. The other settings don't result in a either a dialog in the game window or on the Oculus.
I've been able to drop canvas inside of CentreEyeCamera and view that with a test message via TextMeshPro, but can't get DM to render in that canvas.
Yes
2. Have you added a VRCanvas component to the Dialogue Manager's canvas? (This will add/assign the event camera if it's not already added/assigned.)
Yes. I assume you mean the default canvas object that is a child of the Dialog Manager object.
3. Is your CenterEyeAnchor tagged as "Main Camera"?
Yes
With the above settings, when the project runs and the 'Press space to interact' dialog is visible on the Game window, but not on the VR headset (Oculus).
On Dialog Manager, Canvas object, the rendermode is set to Screen Space - overlay. The other settings don't result in a either a dialog in the game window or on the Oculus.
I've been able to drop canvas inside of CentreEyeCamera and view that with a test message via TextMeshPro, but can't get DM to render in that canvas.
Re: Anyone got Dialog System working with VRIF?
What do you mean by other settings? Screen Space - Overlay definitely won't work . VR and AR don't render to Screen Space - Overlay.
What if you change the Dialogue Manager's default canvas to Screen Space - Camera and set the Plane Distance to something close like 1 or 2? That should give you a HUD-style display.
If you instead want UIs to appear in world space, use world space canvases like the VR examples on the Dialogue System Extras page. They don't use VRIF, but the idea is the same.
If you add the Basic Standard Usable UI prefab to your Usable GameObjects, then when you select them with the Selector or Proximity Selector component they'll show a world space UI. However, for consistency with the rest of your project I recommend using VRIF's interaction system instead of Selector + Usable. For example, add a Dialogue System Trigger to your NPC, and configure VRIF to call the Dialogue System Trigger's OnUse method.
Re: Anyone got Dialog System working with VRIF?
Didn't know that - thanks for the heads up.What do you mean by other settings? Screen Space - Overlay definitely won't work . VR and AR don't render to Screen Space - Overlay.
On the canvas under Dialog Manager object:
- Render Camera: CentreEyeCamera (Anchor)
- Render Mode: Screen Space - Camera
- Plane Distance: 2
When the project is running, the following changes occur:
- Render Camera: Camera Caster
If I click on CameraCaster, a window appears within the scene window and I can see the 'Press space to interact' dialog there, but not on the VR headset itself.
Re: Anyone got Dialog System working with VRIF?
That Camera Caster really seems like the problem. I'll have to put together a test project later today and get back to you.
Re: Anyone got Dialog System working with VRIF?
Looks like VRIF doesn't really like screen space canvases. If you switch to a world space canvas like all the canvases in VRIF's XR Demo scene, you should be good to go.
Re: Anyone got Dialog System working with VRIF?
Thanks for your help on this Tony - I'm trying it again as world space...