Dialogue System not displaying dialogue on mobile only

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
MatthewKing
Posts: 2
Joined: Fri Jan 24, 2020 6:42 pm

Dialogue System not displaying dialogue on mobile only

Post 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!
User avatar
Tony Li
Posts: 22148
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System not displaying dialogue on mobile only

Post 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.
MatthewKing
Posts: 2
Joined: Fri Jan 24, 2020 6:42 pm

Re: Dialogue System not displaying dialogue on mobile only

Post by MatthewKing »

Thank you Tony, your suggestion fixed my problem! I had to change the settings on the Canvas Scaler to Constant Pixel Size
User avatar
Tony Li
Posts: 22148
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System not displaying dialogue on mobile only

Post by Tony Li »

Glad to help!
Post Reply