Page 1 of 1

Dialogue System not displaying dialogue on mobile only

Posted: Thu May 26, 2022 11:50 am
by MatthewKing
Hi,
I setup my scene so that when the Player goes close to an NPC, a "Talk" button shows up (I followed the instructions from this post https://www.pixelcrushers.com/phpbb/vie ... php?t=1945).

If the player presses the Talk button, it calls the ProximitySelector.UseCurrentSelection and disactivate itself and displays the dialogue. It works very well when I run it in the Unity Player and shows the dialogue, but when I build it run it on a mobile (Android) device, I can see the Talk button and the "(spacebar to interact)" text on the top of the screen appearing, but when the player presses the Talk button, it doesn't show the dialogue. I even forced the dialogue to be triggered via code with player.GetComponent<ProximitySelector>().UseCurrentSelection() just to verify that it's not the button on mobile that is the problem but it still doesn't trigger the dialogue but works well inside the Unity Player. Everything related to Quest Machine works well both in the Unity Player and on Android.

I was wondering where should I start for debugging why it doesn't work on mobile? Thanks!

Re: Dialogue System not displaying dialogue on mobile only

Posted: Thu May 26, 2022 1:10 pm
by Tony Li
Hi,

If you can set up logging on your mobile device (e.g., using adb cat), set the Dialogue Manager's Other Settings > Debug Level to Info. Then build, play, and reproduce the issue. Check the logs for a line like:

Dialogue System: Starting conversation 'title' with actor=X and conversant=Y

If you see that line, then the conversation is starting. If the conversation is starting, maybe the screen resolution or aspect ratio is different, and the dialogue UI is open but not visible onscreen -- for example, maybe its UI anchors have positioned it outside the screen boundaries.

Re: Dialogue System not displaying dialogue on mobile only

Posted: Fri Jun 03, 2022 6:50 pm
by MatthewKing
Thank you Tony, your suggestion fixed my problem! I had to change the settings on the Canvas Scaler to Constant Pixel Size

Re: Dialogue System not displaying dialogue on mobile only

Posted: Fri Jun 03, 2022 7:16 pm
by Tony Li
Glad to help!