Page 1 of 1

Start Conversation mouse click

Posted: Thu Jul 15, 2021 3:49 am
by Rokatansky
I'm using your manual in my 2d game. On start dialogues works, but when I'm changing to "On use"(mouse position etc) to start conversation on mouse click it doesn't work. I tried Cube, Button, Square. I tried with empty scene, but I don't see "Press space to Interact" and clicking right mouse button does nothing.
I'm using version 2020.3

Re: Start Conversation mouse click

Posted: Thu Jul 15, 2021 8:13 am
by Tony Li
Hi,

Make sure you've enabled 2D Physics support. (In the Dialogue System's Welcome Window, tick the USE_PHYSICS2D checkbox.)

Try setting the Selector's Max Selection Distance to 9999.

Are there any errors or warnings in the Console window?

Re: Start Conversation mouse click

Posted: Thu Jul 15, 2021 8:48 am
by Rokatansky
Sorry, I should''ve mentioned I read FAQ and applied recommendations.
No errors in log.
Tried few times with no luck, so I' tried to rewrite my code to work with "on enable", but then I can start dialogue only once per scene visit, which is bad and unacceptable. I thought it would be easier to make "on use". Looks like I'm missing something, but can't figure it out. I tried in new project with empty scene and can't get it to work anyway

Re: Start Conversation mouse click

Posted: Thu Jul 15, 2021 10:33 am
by Tony Li
Hi,

Are you using the new Input System package? It has a bug with mouse detection. I can post a workaround here if that's the case.

If you're using Unity's built-in input, here's an example scene:

DS_TestSelector2D_2021-07-15.unitypackage

Please let me know if that works in your project. If not, check that Edit > Project Settings > Player > Other Settings > Scripting Define Symbols includes USE_PHYSICS2D.

Re: Start Conversation mouse click

Posted: Fri Jul 16, 2021 11:42 pm
by Rokatansky
Thanks, it works.
I copied this scene in my project and found out I should place element with Dialogue system trigger in Camera window, not in canvas. This way it works

Re: Start Conversation mouse click

Posted: Sat Jul 17, 2021 7:52 am
by Tony Li
Glad to help!