Hi! I'm a recent user of the Dialogue System and wondered whether it was possible to render the dialogue canvas on a 3D game object in the scene (a notebook in this instance), that can be moved around the scene with animations and whatnot.
I know since the canvas is UI it doesn't work that way, but I was curious if there is a way to work around it or something.
Render the dialogue box on top of a 3D gameObject
Re: Render the dialogue box on top of a 3D gameObject
Hi,
Yes -- in fact, this is what the computer terminal in DemoScene1 does. It has a dialogue UI in a world space canvas. That world space canvas is positioned on top of the computer monitor GameObject.
To do this, add a world space canvas to your notebook. Add a dialogue UI to it. Then, assuming the notebook GameObject will be the conversation actor or conversation conversant, add an Override Dialogue UI component and assign the dialogue UI.
Yes -- in fact, this is what the computer terminal in DemoScene1 does. It has a dialogue UI in a world space canvas. That world space canvas is positioned on top of the computer monitor GameObject.
To do this, add a world space canvas to your notebook. Add a dialogue UI to it. Then, assuming the notebook GameObject will be the conversation actor or conversation conversant, add an Override Dialogue UI component and assign the dialogue UI.
Re: Render the dialogue box on top of a 3D gameObject
Thank you for your help! It worked, and currently, my dialogue menu is projected onto a canvas resembling a notebook.
However, I came across a problem where the NPC's response panels are also being shown on this World Space Canvas, which I'd like to remain as a regular Overlay Canvas, so that their subtitles appear correctly on the screen, regardless of the player's position.
I thought of keeping two Canvases, a World Space one and one for Overlay, and through scripts, I'd be changing the canvases in Dialogue System Controller from one to another, depending on whether or not the NPC is currently talking.
However, I couldn't find any methods or variables in the DialogueSystemController class to replace the current Canvas at runtime, or maybe there is a better way to implement my idea?
However, I came across a problem where the NPC's response panels are also being shown on this World Space Canvas, which I'd like to remain as a regular Overlay Canvas, so that their subtitles appear correctly on the screen, regardless of the player's position.
I thought of keeping two Canvases, a World Space one and one for Overlay, and through scripts, I'd be changing the canvases in Dialogue System Controller from one to another, depending on whether or not the NPC is currently talking.
However, I couldn't find any methods or variables in the DialogueSystemController class to replace the current Canvas at runtime, or maybe there is a better way to implement my idea?
Re: Render the dialogue box on top of a 3D gameObject
You can just put them in separate canvases -- no need for extra scripting.