Page 1 of 1

Dialogue System Cant get Selector to work for 2D

Posted: Tue Sep 03, 2024 7:51 am
by hayds997
Hi all,

I apologise if this is a dumb question in advance, I'm new to Unity but been stuck all day on the first tutorial video

I am trying to setup the Dialogue System Trigger and Selector for 2 2d Objects, one Player one NPC

The video states that when Selector is placed on the Player and the Dialogue System Trigger is set to On Use, the dialogue should show up but I cannot get it to work, no dialogue shows up (I have verified that when its set to On Start it does work)

I've added Box Collider to both NPC and Player objects
I've set the Run raycasts to 2D
This is a brand new project, with the USE_PHYSICS2D enabled

I've attached images of the two objects and their Inspector panels:
https://ibb.co/x7NGd6d
https://ibb.co/CWs6tmY

Any help would be appreciated

Re: Dialogue System Cant get Selector to work for 2D

Posted: Tue Sep 03, 2024 8:11 am
by Tony Li
Hi,

Please see: How To: Fix Selector and Proximity Selector Issues

It sounds like you've done everything correctly so far. If you're making a 2D game and you've set the Selector to Run Raycasts in 2D, make sure you've added a 2D collider to the Usable GameObject. This should be a BoxCollider2D, not a BoxCollider. (BoxCollider is for 3D.)

Re: Dialogue System Cant get Selector to work for 2D

Posted: Tue Sep 03, 2024 9:35 am
by hayds997
I've tested with Box Collider 2D aswell and I cannot get it to work
I opened a 3D environment and checked and its working there correctly, so it seems that there's a missing step to getting it to view on 2D objects

Is there a demo scene of 2D anywhere I can view or something?

Re: Dialogue System Cant get Selector to work for 2D

Posted: Tue Sep 03, 2024 10:23 am
by Tony Li
Hi,

The Dialogue System Extras has a 2D Selector Example (direct download).

If it doesn't work, double-check that the USE_PHYSICS2D checkbox is ticked in the Dialogue System's Welcome Window.